
AP CSA (Java) 1.1-1.4 Practice Questions

Quiz
•
Computers
•
9th - 12th Grade
•
Easy
Yanet Cabrera
Used 6+ times
FREE Resource
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.
Create a free account and access millions of resources
Similar Resources on Wayground
20 questions
JavaScript Basics Test

Quiz
•
10th - 12th Grade
20 questions
Python year 9

Quiz
•
8th - 11th Grade
21 questions
AP CSP Unit 5 Ch 1 Quiz

Quiz
•
9th - 12th Grade
20 questions
APCSA Unit 3

Quiz
•
9th Grade
21 questions
CodeHS JavaScript

Quiz
•
8th - 12th Grade
20 questions
JAVA FUNDAMENTALS

Quiz
•
9th - 12th Grade
20 questions
Python Basics & Syntax

Quiz
•
10th - 12th Grade
20 questions
Java Values and datatypes

Quiz
•
9th - 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
Discover more resources for Computers
50 questions
Trivia 7/25

Quiz
•
12th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
18 questions
"A Quilt of a Country"

Quiz
•
9th Grade
6 questions
RL.10.1 Cite Evidence

Quiz
•
10th Grade
10 questions
Characteristics of Life

Quiz
•
9th - 10th Grade
14 questions
Algebra 1 SOL Review #1

Quiz
•
9th Grade