AP Computer Science A
Quiz
•
Computers
•
10th - 12th Grade
•
Hard
Thomas Martinez
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will this code segment output?
System.out.println("Hello");
System.out.println("World");
Hello
World
HelloWorld
Hello World
Hello
World
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
45 sec • 1 pt
After the following code is executed, what is the value of t?
int t;
t = (int)99.999999;
99.999999
100.0
99
99.0
None of the above — an error occurs.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
After this code is executed, what is the value of x?
double x = 12;
12
12.0
24
unknown
none of these - an error occurs
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
After this code is executed, what is the value of y?
int y;
y = 2.7;
2
2.0
2.7
0
none of these - an error occurs
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following declares and initializes a variable in Java?
int x;
double z = 27;
myInt = 12;
int a = 15;
char c = 'c';
7.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What is the result of this code?
final int z;
z = 20;
z = 30;
System.out.println(z);
30
20
50
nothing is printed
none of these - an error occurs
Create a free account and access millions of resources
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
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
15 questions
Disk Management and Boot Sequence Vocab
Quiz
•
9th - 12th Grade
15 questions
11° Evaluación bimestral de informática
Quiz
•
11th Grade
10 questions
Server Administration- Quiz 1
Quiz
•
12th Grade - University
10 questions
Windows 10 Basics
Quiz
•
9th - 12th Grade
15 questions
Начала программирования на языке Паскаль
Quiz
•
8th - 11th Grade
15 questions
Chapter 3: Storage devices and media (Part 2):
Quiz
•
10th - 11th Grade
10 questions
Analisis Data
Quiz
•
11th Grade
10 questions
evaluasi Sistem Komputer
Quiz
•
10th Grade
Popular Resources on Wayground
20 questions
Brand Labels
Quiz
•
5th - 12th Grade
11 questions
NEASC Extended Advisory
Lesson
•
9th - 12th Grade
10 questions
Ice Breaker Trivia: Food from Around the World
Quiz
•
3rd - 12th Grade
10 questions
Boomer ⚡ Zoomer - Holiday Movies
Quiz
•
KG - University
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
Adding Integers
Quiz
•
6th Grade
10 questions
Multiplication and Division Unknowns
Quiz
•
3rd Grade
20 questions
Multiplying and Dividing Integers
Quiz
•
7th Grade
