Table of Contents
Decision Making in Java: Conditional Statements and Control Flow
🔒 Please log in to unlock this course.
ONLINE CLASSES BY RUMMAN ANSARI
Stuck on a Java Program? Ask Your Doubt Directly
Book a one-to-one session to get your questions answered, or message on WhatsApp for live online classes in Java Programming.
- 1:1 Mentoring
- Doubt Clearing
- Interview Preparation
MCQ Section
MCQ 1
What will be the output? public class Test{ public static void main(String args[]){ int i = 1; do{…
Locked. Enroll to open this MCQ.
MCQ 2
What all gets printed when the following program is compiled and run. public class Test{ public…
Locked. Enroll to open this MCQ.
MCQ 3
What will be the result of compiling and runnig the following code: public class Test{ public…
Locked. Enroll to open this MCQ.
MCQ 4
What will be the value of y after execution of switch statement? public class Test{ public static…
Locked. Enroll to open this MCQ.
MCQ 5
What will be the output? public class Test{ public static void main(String[] args){ int x=10, y=0;…
Locked. Enroll to open this MCQ.
MCQ 6
Choose the correct statement in context of the following program code. public class Test{ public…
Locked. Enroll to open this MCQ.
MCQ 7
Determine output: public class Test{ public static void main(String args[]){ int i, j; for(i=1,…
Locked. Enroll to open this MCQ.
MCQ 8
What will be the result? 1. int i = 10; 2. while(i++
Locked. Enroll to open this MCQ.
MCQ 9
What is the value of a[1] after the following code is executed? int[] a = {0, 2, 4, 1, 3}; for(int…
Locked. Enroll to open this MCQ.
MCQ 10
Consider the following program written in Java. class Test{ public static void main(String args[]){…
Locked. Enroll to open this MCQ.
MCQ 11
What is the printout of the following switch statement? char ch = 'a'; switch (ch){ case 'a': case…
Locked. Enroll to open this MCQ.
MCQ 12
What will be the output of the following program? public class Test{ public static void main(String…
Locked. Enroll to open this MCQ.
MCQ 13
What all gets printed when the following program is compiled and run? public class Test{ public…
Locked. Enroll to open this MCQ.
MCQ 14
Determine output: public class Test{ public static void main(String args[]){ int i; for(i = 1; i <…
Locked. Enroll to open this MCQ.
MCQ 15
What will be the result of the following code? public class Test{ static public void main(String…
Locked. Enroll to open this MCQ.
MCQ 16
How many times will the following code print "Welcome to Examveda"? int count = 0; do {…
Locked. Enroll to open this MCQ.
MCQ 17
Which of the following for loops will be an infinite loop?
Locked. Enroll to open this MCQ.
MCQ 18
Which option, inserted at line 4, produces the output 12? 1. public class Test{ 2. public static…
Locked. Enroll to open this MCQ.
MCQ 19
In java, ________ can only test for equality, where as ________ can evaluate any type of the…
Locked. Enroll to open this MCQ.
Get Java Programming Language updates by email
Short, practical lessons and course updates from Rumman Ansari. No spam.