+ 3
What is the output of this code? Why?
int[] num = new int[5]; booleanl] boo = new boolean[5]; for (int i = 0; i < 5; i++){ if (boo[i]) System.out.print(num[i] % 10); else System.out.print((num[i] + 5) % 10); }
3 Answers
+ 1
I have noted that you post always same question (with different code) then i ask you cant run these codes?
+ 1
default value for boolean is false . and default value for int is 0. therefore output is 55555