<p>I said I would post a little list of things I saw a lot on AP tests/practice tests. Sorry it’s taken awhile, if any of you are still here.</p>
<ul>
<li><p>Know methods of the String class. The ones that pop up the most are String.indexOf(int ch), etc (overloaded method) and String.substring(int) and (int,int). toUpperCase(), toLowerCase(), etc.</p></li>
<li><p>Know how to convert between bases (Usually hexadecimal > decimal or binary > decimal)</p></li>
<li><p>Key differences between abstract classes and interfaces. Can X have a constructor, can Y’s methods have bodies, etc etc.</p></li>
<li><p>GridWorld - I don’t really know what to say here if you aren’t taking a class. Maybe there are some practice GridWorld problems online that you can use? You need to know GridWorld in and out if you want those 5 questions correct. If you aren’t able to get a lot of GridWorld time in, then study the classes as much as you can. GridWorld is a huge part of the exam, so don’t skimp on it.</p></li>
<li><p>Scope of variables. Simple data types (int, char, long) are passed by VALUE. Objects (also arrays) are passed as REFERENCES. They like to put in questions involving the scope of arrays because most people think that arrays are passed by value.</p></li>
<li><p>Know how to manually iterate through single and double for loops.</p></li>
<li><p>Know how to recognize “tricky” recursive functions, such as a method that returns (a * b) while not actually using multiplication. (These functions are usually presented with the method identifier ‘mystery’)</p></li>
<li><p>Sorts and searches: know the implementation of selection sort, insertion sort.
Know conceptualized versions of mergesort + quicksort (know how they work, but typically you don’t need to recognize it in code). Quicksort is the FASTEST sort for a list size greater than 7. Under that, the “bad” sorts are better.</p></li>
<li><p>String.length(); ArrayList.size(); RandomArray.length;</p></li>
<li><p>Stack overflow is basically Java reaching the maximum memory it has been allotted. Therefore, methods that don’t have a stopping point cause stack overflow; know how to recognize when this happens.</p></li>
<li><p>Another thing they like to trick you with - ArrayList. If you are iterating through a list at index i, and i meets the criteria for deletion and is subsequently deleted, then you are REALLY at the index of the next object/data type etc. Kind of confusing at first, but basically just remember: when shifting/deleting data, think carefully about your indices. When iterating through an ArrayList, ONLY increase the index if something wasn’t deleted - otherwise, you will effectively pass over a value.</p></li>
<li><p>Know how compareTo works (interface Comparable)</p></li>
<li><p>Know type casting inside and out.</p></li>
<li><p>Know the (5?) typical exceptions and when they are thrown.</p></li>
<li><p>Note: When a question asks something along the lines of “The program requirements did not specify… it is unknown what to do with X…” the answer is ALWAYS “ask the program requester for clarification.” You do not take programs in your own directions - you always ask.</p></li>
<li><p>Vocabulary (long winded, but necessary)
Software development - writing programs
logic error - your program compiled and ran perfectly, but does not do its functionality correctly. i.e., a program designed to subtract a from b, which the user inputs, actually prints a plus b
exception - runtime error, occurs… during the run time
syntactical error - System.out.prinltn, etc
stub method - dummy method; for test purposes.
encapsulation, polymorphism, inheritance
driver class - class which contains main class
test data - data that’s used to… test your program. need to have a good variety, for instance if it accepts integers then you need to try some negative numbers, 0, positive numbers, etc etc.
object oriented programming - use of objects which interact with eachother
algorithm - step by step solution to a problem
bottom-up development - independent classes come first, then main classes
top-down development - main classes first, then independent
procedural abstraction - fancy word for “hiding your methods,” you usually hide helper methods (private keyword)</p></li>
<li><p>public and private, how they function. protected isn’t tested on the AP exam, but nice to know.</p></li>
<li><p>modulus operator (a % b) - remainder division. 5%4, 4 goes into 5 once with a remainder of 1, therefore 5%4 == 1</p></li>
<li><p>the one thing NEVER compromised is RELIABILITY
the others (speed, memory etc) can be sacrificed to promote another</p></li>
<li><p>unboxing/boxing - primitives into their wrapper classes
(wrapper class for int is Integer, double Double etc.)</p></li>
</ul>
<p>I’ll add more later if you guys want; that’s all I can think of now. Good luck!</p>