Welcome to the Java Forums. I appreciate you making a valid attempt at your work.
When working out code like this, there is no better way to get this structure into your head(when you are first starting out), than to get a pencil and a piece of paper and draw out what exactly is going on. Also, choose your variable names wisely.. I changed it to lowercase i because I couldn't figure out if you were using uppercase I, lowercase L or a number one. Cheers.
Please use
code tags.
int num = 5;
int spaces = 5;
for(int i = 0; i < num; i++) {
for (int a = spaces - 1; a > 0; a--)
System.out.print(" ");
for (int x = 0; x <= i; x++) {
System.out.print("*");
}
System.out.println();
spaces--;
}
See you around!