Question: explain how the output for this code is 10? public class F { public static void main(String[] args) { k = 0; for (int i
explain how the output for this code is 10?
public class F { public static void main(String[] args) { k = 0; for (int i = 0; i < 10; i++) { for (int j = 0; j < 5; j++) { if (j % 2 == 0) { continue; } else if (j == 3) { break; } k++; } } System.out.println("k: " + k);
Step by Step Solution
There are 3 Steps involved in it
There are syntax errors in the code you provided such as the incorrect use of parentheses in the cla... View full answer
Get step-by-step solutions from verified subject matter experts
