Java Control Flow

for (value initialization; testing expression; updating the value) { // body of the loop } class Test { public static void main(String[] args) { // count value exactly 5 times for(int i = 1; i<=5; i++) { System.out.println(“Count: ” + i); } } } Output: Count: 1 Count: 2 Count: 3 Count: 4 Count: 5…

Read More Java For Loop