+91-85006-22255
What will be the output of the following program?
class NestedForloop{ public static void main(String s[]) { int sum = 5; int i = 1; for( ; i <= 4; ) { for(int j = 1; j <= 4; j++ ) { sum += (i * j); i++; } } System.out.println("Sum = " + sum); }}
Topic: Nested for Loop In Java
Read this topic Take test on this topic
Open In App