Units 1 to 6: Mock Exam Final - AP Computer Science A

Flashcard
•
Computers
•
9th - 12th Grade
•
Hard
Wayground Content
Used 1+ times
FREE Resource
Student preview

28 questions
Show all answers
1.
FLASHCARD QUESTION
Front
int x = 5;
double y = x;
What is the value of y?
Back
5.0
2.
FLASHCARD QUESTION
Front
Which is a valid Java boolean expression? Options: true && 5, false == 1, 7 > 3, 3 + 5
Back
7 > 3
3.
FLASHCARD QUESTION
Front
Which code snippet correctly casts a double to an int? Options: int a = 7.2; int a = (int)7.2; int a = double(7.2); int a = toInt(7.2);
Back
int a = (int)7.2;
4.
FLASHCARD QUESTION
Front
If myFlag is a boolean variable, which assignment is valid? myFlag = "true"; myFlag = 1; myFlag = (boolean) 1; myFlag = true;
Back
myFlag = true;
5.
FLASHCARD QUESTION
Front
Which condition will check if a number x is between 10 and 20 (inclusive)? Options: (x > 10 && x < 20), (x >= 10 && x <= 20), (x == 10 || x == 20), (10 < x && x < 20)
Back
(x >= 10 && x <= 20)
6.
FLASHCARD QUESTION
Front
Which of the following code segments, when placed in a method in a class other than WindTurbine, will construct a WindTurbine object wt with an efficiencyRating of 0.25? Options: WindTurbine wt = new WindTurbine(0.25);, WindTurbine wt = 0.25;, WindTurbine wt = new WindTurbine();
wt = 0.25;, WindTurbine wt = new WindTurbine();
wt.efficiencyRating = 0.25;, new WindTurbine wt = 0.25;
Back
WindTurbine wt = new WindTurbine(0.25);
7.
FLASHCARD QUESTION
Front
What is printed as a result of executing the following code segment?
int k = 1; while (k < 20) { if ((k % 3) == 1) System.out.print(k + " "); k++; }
Back
1 4 7 10 13 16 19
Create a free account and access millions of resources
Similar Resources on Wayground
20 questions
Basic Programming Concepts in C++ Language

Flashcard
•
KG
22 questions
Unit 9 Flashcard 1

Flashcard
•
9th - 12th Grade
22 questions
Unit 9 Flashcard 1

Flashcard
•
9th - 12th Grade
19 questions
AP CSP Unit 5 Review: Lists, Loops and Traversals

Flashcard
•
9th - 12th Grade
15 questions
CodeHS 3.1 Boolean Expressions-4.2 For Loops Review

Flashcard
•
9th - 12th Grade
20 questions
CSP Unit 4 Review

Flashcard
•
9th - 12th Grade
20 questions
Python Sem. Review P1

Flashcard
•
11th Grade
28 questions
Kotlin First Week Flashcard

Flashcard
•
KG
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
10 questions
1.2 OSI & TCP IP Models Quiz

Quiz
•
10th Grade
20 questions
Digital Citizenship

Quiz
•
8th - 12th Grade
30 questions
Introduction to Computers

Quiz
•
8th - 9th Grade
35 questions
Computer Baseline Examination 2025-26

Quiz
•
9th - 12th Grade
13 questions
Problem Solving Process

Quiz
•
9th - 12th Grade
20 questions
Hardware vs. Software Quiz

Quiz
•
7th - 10th Grade
10 questions
Understanding Algorithms with Pseudocode and Flowcharts

Interactive video
•
9th - 12th Grade