You can draw this pattern in Java with the following code:
public static void main(String[] args) {
final int length = 10;
for (int a = 1; a < length; a++) {
for (int b = length - 1; b > a; b--) {
System.out.print(" ");
}
for (int b = 1; b <= a; b++)
{
System.out.print("$");
}
System.out.println();
}
}