Originally Posted by
samadniz
can someone plz tell me how this nested for loop is generating this output...
class Nested {
public static void main(String args[]) {
int i, j;
for(i=0; i<10; i++) {
for(j=i; j<10; j++)
System.out.print(".");
System.out.println();
}
}
}
..........
.........
........
.......
......
.....
....
...
..
.
That code will not produce that output. Check your code and post again. Put [code=java] before your code and [/code]after your code.
Dont forget to read the forum rules to avoid "annoying" people.