
Java quiz 3 summer internship
Quiz
•
Other
•
University
•
Practice Problem
•
Hard
Gnaneshwar Reddy
Used 1+ times
FREE Resource
Enhance your content in a minute
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code?
```
int x = 5;
int y = 8;
if (x > y) {
x++;
} else if (x < y) {
y++;
}
System.out.println(x + "" + y);
```
A. 58
B. 59
C. 68
D. 69
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How many times will the following loop execute?
```
int i = 0;
while (i < 3) {
i++;
}
```
A. 2
B. 3
C. 4
D. Infinite
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code?
```
for (int i = 0; i < 5; i++) {
System.out.print(i + " ");
}
```
A. 0 1 2 3 4
B. 0 1 2 3 4 5
C. 1 2 3 4 5
D. None of the above
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the value of 'a' after the following code is executed?
```int a = 10;
for (int i = 0; i < 3; i++) {
a -= i;
}
```
A. 10
B. 7
C. 4
D. 6
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code?
```
int i = 1;
while (i <= 5) {
System.out.print(i + " ");
i += 2;
}
```
A. 1 3 5
B. 1 2 3 4 5
C. 1 3 5 7
D. 1 3 5 7 9
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code?
```
int x = 10;
if (x % 2 == 0) {
System.out.println("Even");
} else {
System.out.println("Odd");
}
```
A. Even
B. Odd
C. Compilation Error
D. None of the above
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How many times will "Hello" be printed by the following code?
```
for (int i = 0; i < 4; i++) {
System.out.println("Hello");
}
```
A. 3
B. 4
C. 5
D. Infinite
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
Políticas Públicas para Idosos no Brasil
Quiz
•
University - Professi...
10 questions
¿Qué tanto se ?
Quiz
•
11th Grade - University
15 questions
Personal finance 1
Quiz
•
University
10 questions
CCHU5001_Week 3_Quiz
Quiz
•
University
10 questions
segundo parcial uvm repostería
Quiz
•
University
15 questions
Diagnosa Gizi - Pertemuan 4
Quiz
•
University
10 questions
Taller 1 (4to): Captura y codificación de los datos en SPSS
Quiz
•
University
13 questions
Among Us
Quiz
•
1st Grade - Professio...
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
54 questions
Analyzing Line Graphs & Tables
Quiz
•
4th 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
Discover more resources for Other
7 questions
How James Brown Invented Funk
Interactive video
•
10th Grade - University
5 questions
Helping Build the Internet: Valerie Thomas | Great Minds
Interactive video
•
11th Grade - University
12 questions
IREAD Week 4 - Review
Quiz
•
3rd Grade - University
23 questions
Subject Verb Agreement
Quiz
•
9th Grade - University
7 questions
Renewable and Nonrenewable Resources
Interactive video
•
4th Grade - University
19 questions
Review2-TEACHER
Quiz
•
University
15 questions
Pre2_STUDENT
Quiz
•
University
20 questions
Ch. 7 Quadrilateral Quiz Review
Quiz
•
KG - University
