
Control Statements in JAVA

Quiz
•
Computers
•
University
•
Hard
RAVIKANTH K
Used 5+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
public class ControlStatement1 {
public static void main(String[] args) {
if(true){
System.out.println("If condition true");
}
}
}
Compile time Error
Run time Error
If condition true
NONE
2.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
public class ControlStatement1 {
public static void main(String[] args) {
if(true){
System.out.println("If condition true");
}else{
System.out.println("Else true");
}
}
}
If condition true
Else true
Both of above
If condition true
Else true
3.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
int a =5, b=10;
if(a>b || a<b){
System.out.println("A greater than B OR A less than B");
}else{
System.out.println("Invalid Condition");
}
A greater than B
A less than B
A greater than B OR A less than B
Invalid Condition
4.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What is a loop statement?
An statement, which is executed repeatedly
An statement, which is executed once
An statement, which is never executed
None of above
5.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
for(int i=0; i<10; i+=2){
System.out.print(i);
}
0123456789
02468
0246810
123456789
6.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
for( ; ; ){
System.out.print("Hello Loop");
}
Run time Error
Compile time error
Hello Loop
Infinite Loop
7.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
int[] arr = {1, 2, 3, 4}
for(int i:arr){
System.out.println(i);
}
1
2
3
4
Compilation Error
Runtime Error
None
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
CMP128 Java Ch. 05 Methods

Quiz
•
University
9 questions
SPB Hfdstk 1 & 1.2

Quiz
•
University
15 questions
Common errors in C programming

Quiz
•
University
10 questions
แบบทดสอบที่ 5 เรื่องการรับค่าในภาษาไพทอน (รายกลุ่ม)

Quiz
•
7th Grade - University
10 questions
Briefing Operator Java

Quiz
•
University
15 questions
Bootcamp Day 3 - Java Array

Quiz
•
University
10 questions
Java Quiz 1

Quiz
•
University
15 questions
Code Craft : Java & Web Quiz"

Quiz
•
University
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
21 questions
Spanish-Speaking Countries

Quiz
•
6th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
7 questions
Common and Proper Nouns

Interactive video
•
4th Grade - University
12 questions
Los numeros en español.

Lesson
•
6th Grade - University
7 questions
PC: Unit 1 Quiz Review

Quiz
•
11th Grade - University
7 questions
Supporting the Main Idea –Informational

Interactive video
•
4th Grade - University
12 questions
Hurricane or Tornado

Quiz
•
3rd Grade - University
7 questions
Enzymes (Updated)

Interactive video
•
11th Grade - University