
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
22 questions
Unit 1 Terms

Quiz
•
12th Grade
20 questions
PowerPoint Basics!

Quiz
•
9th - 12th Grade
20 questions
SAINS KOMPUTER T4

Quiz
•
12th Grade
20 questions
Quiz Before UTS - PRO RPL - XII

Quiz
•
12th Grade
15 questions
Kuis Pemprograman Perangkat Bergerak

Quiz
•
9th - 12th Grade
23 questions
APCS A Java Arrays vs ArrayLists

Quiz
•
10th - 12th Grade
25 questions
Grade XII-IP Self Evaluation (Python Series)

Quiz
•
12th Grade
17 questions
JavaScript and Graphics

Quiz
•
12th Grade
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 Other
10 questions
Video Games

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

Lesson
•
9th - 12th Grade
6 questions
Rule of Law

Quiz
•
6th - 12th Grade
15 questions
ACT Math Practice Test

Quiz
•
9th - 12th Grade
18 questions
Hispanic Heritage Month

Quiz
•
KG - 12th Grade
28 questions
Ser vs estar

Quiz
•
9th - 12th Grade
10 questions
Would you rather...

Quiz
•
KG - University
13 questions
BizInnovator Startup - Experience and Overview

Quiz
•
9th - 12th Grade