
JAVA control Structure
Quiz
•
Computers
•
Professional Development
•
Practice Problem
•
Medium
Dr Manishankar S
Used 32+ times
FREE Resource
Enhance your content in a minute
12 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a selection statement in Java?
for
switch
while
do-while
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code? int x = 5; if (x > 2) System.out.println("A"); else System.out.println("B"); System.out.println("C");
A C
B C
A
C
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which loop executes at least once, regardless of the condition?
while
for
do-while
switch
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The statement continue; inside a loop:
Terminates the loop immediately
Skips the rest of the loop body and jumps to the next iteration
Exits the program
None of the above
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code? for (int i = 1; i <= 3; i++) { if (i == 2) break; System.out.print(i + " "); }
1 2 3
1
1 2
2 3
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which is the correct way to read an integer from console using Scanner?
int x = Scanner.nextInt();
Scanner sc = new Scanner(System.in); int x = sc.nextInt();
sc.nextInt(); Scanner sc = new Scanner(System.in);
None of these
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In Java, System.out.println() is used to:
Read data from console
Print data to console followed by a newline
Print data without newline
None of the above
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
11 questions
FDE cycle
Quiz
•
Professional Development
10 questions
GENERAL KNOWLEDGE
Quiz
•
Professional Development
10 questions
Ice Breaker Challenge- Guess the Tool by Its Logo
Quiz
•
Professional Development
15 questions
Quiz on Operating System Services
Quiz
•
Professional Development
10 questions
ML in Apple platforms
Quiz
•
University - Professi...
13 questions
TIP Trivia
Quiz
•
Professional Development
10 questions
Digital Tools in Education Pre-Test
Quiz
•
Professional Development
14 questions
ABREDES - Devasc Python
Quiz
•
Professional Development
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
Discover more resources for Computers
10 questions
How to Email your Teacher
Quiz
•
Professional Development
6 questions
3RD GRADE DECLARATION OF INDEPENDENCE EXIT TICKET
Quiz
•
Professional Development
19 questions
Black History Month Trivia
Quiz
•
6th Grade - Professio...
22 questions
Multiplying Exponents with the Same Base
Quiz
•
9th Grade - Professio...
40 questions
Flags of the World
Quiz
•
KG - Professional Dev...
