StudyFox

AP Computer Science A

AP Computer Science A: Free review notes for every unit · 6 lessons

Open in StudyFox Free, no ads. Practice, track progress and quiz yourself in the app.

Java programming from the ground up: objects and methods, conditionals and loops, writing classes, arrays, ArrayLists, 2D arrays, and recursion.

AP · Grades 10 to 12 · 6 lessons · about 49 minutes

Lessons

  1. The exam and how to write FRQ code5 min

    The exam is 3 hours: a multiple-choice section (90 min) and four free-response questions (90 min) where you write Java methods and classes. A Java Quick…

  2. Using objects, methods, and Strings9 min

    Primitive types: int , double , boolean . Integer division truncates: 7 / 2 is 3 ; 7 % 2 is 1 . Casting: (double) 7 / 2 is 3.5 ; (int) 3.9 is 3 . Objects are…

  3. Selection and iteration9 min

    Boolean logic: && (and), || (or), ! (not). Java uses short-circuit evaluation: in a && b , if a is false, b isn't checked. De Morgan's laws…

  4. Writing classes9 min

    Instance variables are private ; they store each object's state. Constructors have the class name and no return type; they initialize instance variables…

  5. Arrays and ArrayLists9 min

    Arrays have a fixed size: int[] nums = new int[5]; Access with nums[i] ; size is nums.length (no parentheses). ArrayLists resize: ArrayList<String> list…

  6. 2D arrays and recursion8 min

    2D arrays int[][] grid = new int[3][4]; has 3 rows and 4 columns. grid.length is the number of rows; grid[0].length is the number of columns. Traverse with…