The table below summarizes Java language features and other testable topics that may appear on the AP Computer Science A exam and have been covered during the first semester of the 2017-2018 AP Computer Science A course taught by Mr. Spurgeon at Valley Catholic High School. Questions about this material may appear on the semester 1 final exam. Page numbers in the References column refer to pages in Robert Sedgewick and Kevin Wayne's textbook Computer Science: An Interdisciplinary Approach (ISBN-13: 978-0-13-407642-3).
Language Feature / Topic | References |
---|---|
Comments/* */, //, and /** */Javadoc @param and @return comment tags |
p. 9 https://en.wikipedia.org/wiki/Javadoc |
Primitive Typesint, double, boolean |
pp. 22-27 |
Operators
Arithmetic: +, -, *, /, %
Increment/Decrement: ++, --
Assignment: =, +=, -=, *=, /=, %=
Relational: ==, !=, <, <=, >, >=
Logical: !, &&, ||
Numeric casts: (int), (double)
String concatenation: +
|
Arithmetic operators: pp. 22, 24
Increment/decrement operators: p. 60 Assignment and compound assignment operators: pp. 17, 60 Relational operators: pp. 27-29 Logical operators: pp. 26 Numeric casts: pp. 32-35 String concatenation: pp. 19-21 Operator precedence: p. 17 Short-circuit evaluation: https://en.wikipedia.org/wiki/Short-circuit_evaluation |
Object Comparison
object identity ( ==, != ) vs.
object equality ( equals ),String compareTo |
identity vs. equality comparison: pp. 331-333, 364
String.compareTo method:
https://docs.oracle.com/javase/7/docs/api/java/lang/String.html#compareTo(java.lang.String) |
Input / OutputSystem.out.print, System.out.println |
pp. 7-8 |
ExceptionsArithmeticException, NullPointerException, IndexOutOfBoundsException, ArrayIndexOutOfBoundsException, IllegalArgumentException |
pp. 465-466 |
Arrays
1-dimensional arrays, 2-dimensional arrays, initializer list: { ... } ,
row-major order of 2D array elements |
1-dimensional arrays: pp. 90-100
2-dimensional arrays: pp. 106-111 |
Control Statements
if, if/else ,
while, for ,
enhanced for (for-each),
return
|
pp. 50-64
https://docs.oracle.com/javase/tutorial/java/nutsandbolts/for.html |
Variables
parameter variables, local variables, static (class) variables:
visibility, ( public, private ), final
|
pp. 15-16
public vs. private : p. 433
final: pp. 384, 404 (constant variables: p. 16) |
Methods
visibility, ( public, private ), static ,
method signatures, parameters, arguments |
pp. 191-210
public vs. private : pp. 228, 433
static : p. 340
method signatures: pp. 30, 196 |
Standard Java LibraryString, Math |
Java Libraries: p. 1094
Math : p. 1139
https://docs.oracle.com/javase/7/docs/api/java/lang/String.html https://docs.oracle.com/javase/7/docs/api/java/lang/Math.html |
For more information about how these topics are related to the AP Computer Science A exam administered by the College Board, see Appendix A (which begins on page 61) of the .pdf document posted at:
http://media.collegeboard.com/digitalServices/pdf/ap/ap-computer-science-a-course-description.pdf