
Java 1
Quiz
•
Computers
•
University
•
Practice Problem
•
Hard
Det Det
FREE Resource
Enhance your content in a minute
22 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What are the two main types of data types in Java?
Answer explanation
Java has primitive data types (e.g., int, boolean) and reference data types (e.g., objects, arrays).
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is NOT a primitive data type in Java?
Answer explanation
String is a reference type, not a primitive.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the default value of a reference variable in Java?
Answer explanation
Reference variables default to null, meaning they do not reference an object until initialized.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the size of an int in Java?
Answer explanation
Java int is always 32-bit signed.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will System.out.println(10 / 4); print?
Answer explanation
Integer division truncates the decimal, so 10 / 4 results in 2.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will System.out.println((5 > 3) ? "Yes" : "No"); print?
Answer explanation
Since 5 > 3 is true, the ternary operator returns 'Yes'.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will System.out.println(2 + "3"); print?
Answer explanation
2 is converted to a string, so '2' + '3' results in '23'.
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
20 questions
Living in the IT era QUIZ 2
Quiz
•
University
20 questions
CETA'S Quizzard
Quiz
•
University
20 questions
Information Management - QUIZ
Quiz
•
University
18 questions
AI 900 - pt 1
Quiz
•
University
20 questions
DIAGRAMAS UML DE CLASE
Quiz
•
University
20 questions
04-JS циклы while, do..while, for...
Quiz
•
University
18 questions
PBO Inheritance Episode 2
Quiz
•
University
20 questions
FRAMING,Bit Stuffing, PPP,HDLC,
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
