Everytime I run this nested code, I just get stuck inside of an infinite loop.. any help? I'm not familiar with nested loops at all. I'm supposed to be getting:
123456
12345
1234
123
12
1
public void displayPatternII (int lines) {
System.out.println("\n\tPattern II\n");
for (int i = 6; i => lines; i++){
for (int j = 1; j <=i; j--){
System.out.print(j);
}
System.out.println();
}
}