
Java Programming Quiz

Quiz
•
Other
•
12th Grade
•
Easy
Ingrid Merwe
Used 14+ times
FREE Resource
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is System.out.println used for in Java?
To create a new variable
To display text with a newline at the end
To stop the program
To read user input
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What’s the difference between print and println in Java?
print adds a newline; println does not
println prints text without a newline; print adds a newline
println adds a newline; print does not
They both do the same thing
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following declares an integer variable in Java?
double x = 10;
int x = 10;
String x = 10;
boolean x = true;
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of the double data type?
To store true or false values
To store whole numbers
To store large, floating-point numbers
To store text
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How would you declare a string variable named name in Java?
String name = "John";
int name = "John";
double name = "John";
boolean name = "John";
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which data type would be best for storing a true or false value?
int
boolean
double
String
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does JOptionPane.showMessageDialog do in Java?
Displays a dialog box with a message
Reads user input from the keyboard
Initializes a new variable
Opens a new file
Create a free account and access millions of resources
Similar Resources on Wayground
20 questions
SAINS KOMPUTER T4

Quiz
•
12th Grade
15 questions
JS 1

Quiz
•
12th Grade
15 questions
39W Final Exam PLTW

Quiz
•
9th - 12th Grade
20 questions
PowerPoint Basics!

Quiz
•
9th - 12th Grade
16 questions
Java For Loop

Quiz
•
10th Grade - University
20 questions
Java Primitive Practice

Quiz
•
12th Grade
22 questions
Unit 1 Terms

Quiz
•
12th Grade
17 questions
JavaScript and Graphics

Quiz
•
12th Grade
Popular Resources on Wayground
50 questions
Trivia 7/25

Quiz
•
12th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
11 questions
Negative Exponents

Quiz
•
7th - 8th Grade
12 questions
Exponent Expressions

Quiz
•
6th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
20 questions
One Step Equations All Operations

Quiz
•
6th - 7th Grade
18 questions
"A Quilt of a Country"

Quiz
•
9th Grade