
Java Programming

Quiz
•
Computers
•
University
•
Hard

SUMATHI A
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is not a primitive data type in Java?
int
float
String
Boolean
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
2. What is the purpose of encapsulation?
To hide the implementation details of a class.
To make code more efficient.
To increase code complexity.
d
To reduce code readability.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
3. Which of the following is a conditional statement in Java?
while
if-else
for
do-while
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will the following code output?
int x = 10;
while (x > 0) {
System.out.println(x);
x--;
}
10 9 8 7 6 5 4 3 2 1
1 2 3 4 5 6 7 8 9 10
10 9 8 7 6 5 4 3 2
Infinite loop
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
5. What are the two main types of exceptions in Java?
Compile-time and runtime exceptions.
Checked and unchecked exceptions.
Logical and syntax exceptions.
Input and output exceptions.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
6.What is the purpose of BufferedReader in Java?
To convert bytes into characters
To read data from a file byte by byte
To read data from a file line by line
To read data from a file line by line
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
7. What is the purpose of packages in Java?
To provide a mechanism for accessing classes from different packages.
To handle exceptions in Java.
To define methods for handling input/output operations.
To group related classes and interfaces together.
Create a free account and access millions of resources
Similar Resources on Wayground
12 questions
javaquizvivek

Quiz
•
University
10 questions
OOPJ #1

Quiz
•
University
10 questions
Web Programming Quiz 1

Quiz
•
University
15 questions
Stored Procedure, Function & Packages

Quiz
•
University
10 questions
Mastering Python Fundamentals

Quiz
•
University
10 questions
P1_APLab2Quiz_B3B4

Quiz
•
University
12 questions
HTML, JAVASCRIPT,XML

Quiz
•
University
10 questions
Computer Languages

Quiz
•
KG - University
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

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

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
10 questions
Would you rather...

Quiz
•
KG - University
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

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

Interactive video
•
4th Grade - University
10 questions
The Constitution, the Articles, and Federalism Crash Course US History

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

Interactive video
•
4th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
16 questions
Water Modeling Activity

Lesson
•
11th Grade - University
10 questions
ACT English prep

Quiz
•
9th Grade - University