1.

What will be the output of the following code ? (i) int m=2; int n=15; for(int i = 1; i<5; i++); m++; – -n; System.out.println(“m=”+m); System.out.println(“n-”+n);(ii) char x=‘A’; int m; m= (x==’a’) ? ‘A’: ‘a’; System.out.println(“m=” +m);

Answer»

(i) After executing this code the output will be: m=3 n=14 

(ii) After executing this code the output will be: m=97



Discussion

No Comment Found

Related InterviewSolutions