
Java1 - Week2

Quiz
•
Other
•
University
•
Hard

Yahini Prabha Murugesan
Used 11+ times
FREE Resource
25 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What's the value of the below?
boolean b = (5 > 2);
True
False
5
2
2.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What's the value of the below?
score = 75;
if (score >= 90.0)
System.out.print("A");
else if (score >= 80.0)
System.out.print("B");
else if (score >= 70.0)
System.out.print("C");
else if (score >= 60.0)
System.out.print("D");
else
System.out.print("F");
A
B
C
D
3.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What's the value of below?
int Status =2;
switch (status) {
case 0: System.out.println(0);
break;
case 1: System.out.println(1);
break;
case 2: System.out.println(2);
case 3: System.out.println(3);
break;
default: System.out.println("Invalid");
System.exit(1);
}
2
3
2
3
2
3
Invalid
4.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What's the value of the below?
int x = 10;
y = (x > 15) ? 1 : -1;
System.out.println(y);
10
15
-1
1
5.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What's the output of the below?
int num = 11;
if (num % 2 == 0)
System.out.println("If is the right answer");
else
System.out.println("Else is the right answer”);
If is the right answer
Else is the right answer
Runtime Error
Compiler Error
6.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What's the value of the below?
score = 55;
if (score >= 50.0)
System.out.print("PASS");
else
System.out.print("FAIL");
PASS
FAIL
PASS FAIL
55
7.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What's the value of below?
int Status =20;
switch (status) {
case 0: System.out.println(0);
break;
case 1: System.out.println(1);
break;
case 2: System.out.println(2);
break;
case 3: System.out.println(3);
break;
default: System.out.println("Invalid");
System.exit(1);
}
2
3
2
3
2
3
Invalid
Invalid
Create a free account and access millions of resources
Similar Resources on Wayground
24 questions
Java Programming midterm exam

Quiz
•
University
25 questions
C Programming

Quiz
•
12th Grade - University
25 questions
ROUND1

Quiz
•
University
20 questions
SET 2 quiz

Quiz
•
University
20 questions
CODE CRAFT

Quiz
•
University
24 questions
ФМиЕТ

Quiz
•
University
20 questions
Mastering Java Concepts

Quiz
•
University
25 questions
round 2

Quiz
•
University
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Other
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

Quiz
•
8th Grade - University
7 questions
Force and Motion

Interactive video
•
4th Grade - University
36 questions
Unit 5 Key Terms

Quiz
•
11th Grade - University
7 questions
Figurative Language: Idioms, Similes, and Metaphors

Interactive video
•
4th Grade - University
15 questions
Properties of Equality

Quiz
•
8th Grade - University
38 questions
WH - Unit 3 Exam Review*

Quiz
•
10th Grade - University
21 questions
Advise vs. Advice

Quiz
•
6th Grade - University
12 questions
Reading a ruler!

Quiz
•
9th Grade - University