
Java Conditional Constructs
Authored by Anubha Pal
Computers
9th - 10th Grade
Used 170+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
public void main()
{
double temp = 56.0;
if (temp <=54.0 && temp>40)
System.out.println(“It is too hot”);
else if ( temp<40 || temp>30)
System.out.println(“It is hot but not too much”);
else
System.out.println(“It is pleasant”);
}
What will be the output?
It is too hot
It is pleasant
It is hot but not too much
runtime error
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
PREDICT THE OUTPUT:
int x = 20;
int y = 18;
if(x>y)
System.out.println("x is greater than y");
else
{
System.out.println("Error");
System.out.println("Incorrect code");
}
Error
Incorrect code
x is greater than y
Error
Incorrect code
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
PREDICT THE OUTPUT:
int x = 60;
int y = 90;
if (y%x == 0 && y-x==30)
{
System.out.println("Hello World");
}
else
{
System.out.println("Error")
}
Hello World
Hello World
Error
Error
Hello world
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of above statement-
5
No output
6
Error
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
5. If a, b and c are the sides of a triangle then which of the following statement is true for:
if(a==b && a==c && b==c)?
Equilateral triangle
Scalene triangle
Isosceles triangle
All of the above
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In a switch case, when the switch value does not respond to any case then the execution transfers to:
break
default
loop
none
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Condition is essentially formed using:
Arithmetic operators
Relational operators
Logical operators
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
20 questions
Câu hỏi ôn tập GK2
Quiz
•
9th Grade
20 questions
Skill Competition Quiz 2024
Quiz
•
10th Grade - University
17 questions
ARQUITECTURA DE COMPUTADORAS
Quiz
•
10th Grade
20 questions
Evaluación 2° Tecnología
Quiz
•
9th - 12th Grade
20 questions
Perakitan dan Pengujian Komputer - KJD
Quiz
•
10th Grade
20 questions
Operator Aritmetika dan Perbandingan
Quiz
•
10th Grade
20 questions
Sistemas operativos 1
Quiz
•
1st - 10th Grade
20 questions
informatica
Quiz
•
6th - 11th Grade
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