MCQOPTIONS
Bookmark
Saved Bookmarks
→
Java Programming
→
Exceptions
→
What would be the output of the following codesnip...
1.
What would be the output of the following codesnippet if variable p=20?
A.
10
B.
50
C.
15
D.
20
E.
30
Answer» D. 20
Show Answer
Discussion
No Comment Found
Post Comment
Related MCQs
What is the valid data type for variable a to print Interview Mania ?switch(p){ System.out.println("Interview Mania");}
What is the output of this program?public class jump_statment_Example { public static void main(String args[]) { int p = 4; int q = 5; for ( ; q < 10; ++q) { if (q % p == 0) { continue; } else if (q == 10) { break; } else { System.out.print(q + " "); } } } }
What is the output of this program?public class selection_statement_Example { public static void main(String args[]) { int num1 = 10; int num2 = 20; if ((num2 = 5) == num1) { System.out.print(num2); } else { System.out.print(++num2); } } }
What would be the output of the following codesnippet if variable p=20?public class Result { public static void main(String args[]) { int p=20; if(p<=0) { if(p==0) { System.out.println("5 "); } else { System.out.println("10 "); } } System.out.println("15 "); } }
What is the valid data type for variable a to print Interview Mania ?
What would be the output of the following codesnippet if variable p=20?
Reply to Comment
×
Name
*
Email
*
Comment
*
Submit Reply
Your experience on this site will be improved by allowing cookies. Read
Cookie Policy
Reject
Allow cookies