3) What will be the value returned by the method calci () if it is called with parameter”3”?
public static int calci(int n) { if (n < 1) return 3; else return 3 + calci(n – 1); }
8) What is the output of the program? class jmp_stmt { public static void main(String args[]) { int p = 2; int q = 0; for ( ; q < 10; ++q) { if (q % p == 0) continue; else if (q == 8)
break; else System.out.print(q + ” “); } } }
1. class Check { 2. public static void main(String args[]) 3. { 4. int x =5; 5. int y =10; 6. first:{ 7. second:{ 8. third:{ 9. if(x == y >>1) break second; } System.out.println(x); 10. } System.out.println(y); } } }