
Java Programming
Authored by SUMATHI A
Computers
University

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
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?
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.
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
10 questions
Node.js
Quiz
•
University
10 questions
PHP Introduction - Assignment 1
Quiz
•
University
10 questions
margaret hamilton
Quiz
•
University
9 questions
BASIC HTML
Quiz
•
University
10 questions
Initial Assessment - Cybersecurity Awareness
Quiz
•
9th Grade - Professio...
10 questions
Software Testing
Quiz
•
University
10 questions
C++ Array Quiz
Quiz
•
University
15 questions
Computer Applications in Banking and Finance Quiz
Quiz
•
University
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