
Control Statements in JAVA
Quiz
•
Computers
•
University
•
Practice Problem
•
Hard
RAVIKANTH K
Used 5+ times
FREE Resource
Enhance your content in a minute
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
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
15 questions
[CEH4H3] Sistem Tertanam Ganjil 1819 Kuis Online 2
Quiz
•
University
15 questions
Chapter 8 - Memory Management Strategies
Quiz
•
University
10 questions
Website Usability and UX
Quiz
•
University
15 questions
GK Quiz
Quiz
•
University
10 questions
Access 1
Quiz
•
University
10 questions
2024 - Struktur Data Quiz 1
Quiz
•
University
10 questions
Files and Directories
Quiz
•
University
10 questions
System Analysis & Design
Quiz
•
University
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
