
AP CSA (Java) 1.1-1.4 Practice Questions
Authored by Yanet Gagliotti
Computers
9th - 12th Grade
Used 10+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
25 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will this code segment output?
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which code segment will print “Hello Karel” to the screen in Java?
System.out.printLine("Hello Karel");
print "Hello Karel";
System.out.println("Hello Karel");
System.println("Hello Karel");
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will this code segment output?
This won’t print anything.
It will only print the first line as ***** since only one print statement can be used.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct syntax for writing the main method in Java?
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a proper way to declare and initialize a variable in Java?
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Consider the following code snippet. What value of z is actually printed?
20
30
This code gives an error.
Nothing is printed.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What are the memory values associated with the variables x, y, and z after the code snippet below executes?
x holds the int value 7, y holds the double value 2.0 and z holds the boolean value false.
x holds the int value 10, y holds the double value 2.0 and z holds the boolean value true.
This code snippet will result in a compile time error.
x holds the int value 10, y holds the double value 2.0 and z holds the boolean value false.
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
21 questions
CPA MS-Office Hotkeys Quiz
Quiz
•
8th Grade - Professio...
21 questions
AQA 4.6.4 Logic Gates and Circuits
Quiz
•
11th Grade
21 questions
GarageBand / Logic Shortcuts
Quiz
•
11th Grade
20 questions
1.02 Career Opportunities - Entrepreneurship 1
Quiz
•
11th Grade
20 questions
ตอบปัญหาคอมพิวเตอร์st
Quiz
•
9th - 12th Grade
20 questions
Online Platform Block Q
Quiz
•
11th - 12th Grade
20 questions
City & Guilds Award in Business Processes
Quiz
•
12th Grade
20 questions
Keyboard Quiz
Quiz
•
9th Grade
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