May someone explain to me why the following blocks of code generate such different outputs?
public class hello { public static void main(String args[]) { int a,b,c; for (a = 0; a < 5; a++) { for (b = 4; b >= a; b--) { System.out.print(" "); } for (c = 0; c <= a - b; c++) { System.out.print("*"); } System.out.println(); } } } Output:
public class hello { public static void main(String args[]) { int a,b,c; for (a = 0; a < 5; a++) { for (b = 4; b >= 0; b--) { System.out.print(" "); } for (c = 0; c <= a - b; c++) { System.out.print("*"); } System.out.println(); } } } Output:
Shouldnt the outputs be the same since b >= a is equivalent to b >= 0 as b's value will be deducted by 1 for every loop?


a == 1ora == 2? its not the same asa == 0