
Java Programming Quiz

Quiz
•
Computers
•
University
•
Medium

LAKSHMI NARAYANA INAMPUDI
Used 1+ times
FREE Resource
25 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the output of the following code?
int a = 5, b = 2;
System.out.println(a + b * 2);
14
9
10
7
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What will be printed?
int x = 10;
System.out.println(++x);
10
11
9
Error
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Avani is trying to name her new Java class for a school project. She wants to choose a name that follows the rules of valid identifiers in Java.
Which of the following names is NOT a valid identifier for her class?
_student
123name
name123
$total
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the output?
int x = 5;
int y = 10;
System.out.println(x > y ? x : y);
10
5
true
false
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Aisha is learning programming and comes across several terms.
She needs to identify which of the following is NOT a Java keyword.
this
new
integer
class
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the output of this while loop?
int i = 1;
while(i < 4)
{
System.out.print(i + " ");
i++;
}
0 1 2 3
1 2 3
1 2 3 4
Infinite loop
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
During a coding workshop, Tisha is learning about escape sequences in programming.
She comes across a question about which escape sequence represents a newline.
Can you help her identify the correct one?
\n
\t
\r
\b
Create a free account and access millions of resources
Similar Resources on Wayground
27 questions
IEEE Coding Cybersecurity

Quiz
•
University
20 questions
Java Objects - Real world Scenarios - Practice Quiz

Quiz
•
University
20 questions
Fianal JAVA OOP

Quiz
•
University
20 questions
Java Objects Basics Quiz

Quiz
•
University
20 questions
Java Quiz 1

Quiz
•
University
20 questions
Quiz 2 PBO

Quiz
•
University
23 questions
Java

Quiz
•
11th Grade - University
20 questions
2-mavzu. Kotlin dasturlash tilida tarmoqlanuvchi, takrorlanuvchi

Quiz
•
University
Popular Resources on Wayground
12 questions
Unit Zero lesson 2 cafeteria

Lesson
•
9th - 12th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
Lab Safety Procedures and Guidelines

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

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
20 questions
Lab Safety and Equipment

Quiz
•
8th Grade
13 questions
25-26 Behavior Expectations Matrix

Quiz
•
9th - 12th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
15 questions
Let's Take a Poll...

Quiz
•
9th Grade - University
2 questions
Pronouncing Names Correctly

Quiz
•
University
12 questions
Civil War

Quiz
•
8th Grade - University
18 questions
Parent Functions

Quiz
•
9th Grade - University
21 questions
Mapa países hispanohablantes

Quiz
•
1st Grade - University
19 questions
Primary v. Secondary Sources

Quiz
•
6th Grade - University
25 questions
Identifying Parts of Speech

Quiz
•
8th Grade - University
20 questions
Disney Trivia

Quiz
•
University