AP Exam

Important Topics to Review

 

·       Created by Dylan T (2021) 

 

 

Variables

·       primitive vs non-primitive

·       object variables

·       the this keyword and how to use it

·       declaration vs instantiation

·       = vs ==

·       name reflects purpose

·       static vs instance

·       type casting ie: (int) (double)

·       char

·       int vs long

·       float vs double

·       min and max range for int

 

Methods

 

·        function = static method

·       static vs instance

·       serves one purpose

·       return types

·       abstract

·       return value must be initialized

·       parameters provide information to be used (in the exam)

·       name reflects meaning

·       overloading

·       formal vs informal parameters

·       recursion

·       pre-conditions

 

Arraylists

 

·       dynamic size

·       <typed>

·       key methods: get, set, add, remove, size

·       import java.util.ArrayList

·       wrapper classes

·       sequential searching vs binary searching

 

Arrays

 

·       fixed size (static size)

·       1D vs 2D

·       nested loops for 2D processing

·       how to get length of rows and cols

·       [based]

·       .length

·       row:col order

·       sequential searching vs binary searching

 

Boolean logic

 

·        ! means not

·        || means or

·       && means and

·       DeMorgan’s Law:  ! (A && B) is same as !A || !B

·       DeMorgan’s Law:  ! (A || B) is same as !A && !B

Strings

 

·       cannot be changed (immutable)

·       manipulation

·       inherits object methods

·       .length()

·       .equals vs ==

·       indexOf()

·       substring(#) vs substring(#,#)

·       compareTo

·       toUpperCase() and toLowerCase()

 

Sorting

 

·       when to use each

·       merged sorting

·       selection sorting

·       insertion sorting

·       comparable interface

·       Arrays.sort()  <can we use this?>

 

Loops

 

·       while

·       for

·       for each

 

Exceptions

 

·       Nullpointer

·       Arithmetic

·       OutOfBounds

·       IllegalArgument

 

Classes (OOP)

 

·        Instance variables (datafields)

·        Constructors

·        Instance methods

·        Inheritance (extends keyword)

·        Subclass

·        Superclass

·        Aggregation

·        Abstract

·        Data encapsulation

·        Interface (implements keyword)

·        Polymorphism


Math

·       Math.abs

·       Math.pow

·       Math.sqrt

·       Math.random

·       / used for integer division vs normal division

·       Symbols: +=   /=   -=   *=    %=

·       ++ and --

NO’s

 

·       [] vs <>

·       Never output anything to screen (system.out.print / system.out.println)

·       No return in void/constructors

 

Extra

 

·       @param 

·       @return

 

 

Thank you to Dylan T for creating and sharing this resource.