
AP CSA (Java) 1.1-1.4 Practice Questions

Quiz
•
Computers
•
9th - 12th Grade
•
Easy
Yanet Gagliotti
Used 9+ 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
1.2.2 Application Generation

Quiz
•
12th Grade - University
20 questions
Round-1 Technical Aptitude

Quiz
•
11th Grade - Professi...
20 questions
function in python

Quiz
•
12th Grade
20 questions
Python Loops Quiz

Quiz
•
10th Grade
20 questions
Chapter 2 Exam: Getting Started with Java

Quiz
•
10th - 12th Grade
20 questions
JavaScript Quiz

Quiz
•
11th Grade
24 questions
Java Loops

Quiz
•
10th - 12th Grade
24 questions
Unit 4 Quiz 2 Review

Quiz
•
9th - 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 Computers
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
20 questions
Analog vs Digital

Quiz
•
9th - 12th Grade
10 questions
CTEA Computer Vocab Terms #1

Quiz
•
12th Grade
10 questions
Exploring Cybersecurity Techniques and Threats

Interactive video
•
6th - 10th Grade
10 questions
Understanding the Internet and Data Transmission

Interactive video
•
7th - 12th Grade