Topic | Basic | Intermediate | Advanced |
---|---|---|---|
The JDK |
Understand what the Java Development Kit (JDK) is.
Know that the JDK includes many pre-built classes for use in Java programs
Use classes defined by java in the
java.lang package such as java.lang.String and java.lang.Math . |
Write code that imports and uses classes from packages other than
java.lang . |
Use Javadocs to find information about JDK classes.
|
Strings |
Create
String values using string literals.Use the
String methods: length() , substring() , indexOf() , toUpperCase() , and toLowerCase() along with the + operator to take apart and put back together String s in various ways. (E.g. capitalize a string.) |
Write code that uses
equals() and compareTo() to compare strings.Understand String immutability and its implications
Use more advanced String methods: equals(), compareTo(), trim()
Work with escape sequences in Strings
|
Write
String literals containing Unicode characters.Explore other methods defined in the
String class that are documented in the Javadocs.Learn about regular expressions.
Use the
StringBuilder class to create strings rather than repeated uses of the + operator. |
toString() |
Explain when the
toString() method is called automatically.Override
toString() in your own classes to provide meaningful String representations. |
Explain the difference and relationship between the
toString() method and String.valueOf . |
|
ArrayLists |
Construct empty
ArrayList s.Add and remove elements to and from an
ArrayList .Access elements in an
ArrayList using get() and set() . |
Correctly declare
ArrayList s with a type parameter, e.g. ArrayList<String> .Correctly initialize
ArrayList s declared with a type parameter.Iterate over
ArrayList s using regular and enhanced for loops.Explain what causes an
IndexOutOfBoundsException when using an ArrayList . |
Write code that removes elements meeting some criteria from an
ArrayList .Explain when you will get a
ConcurrentModificationException |
Wrapper classes |
Describe the one situation when you must explicitly refer to wrapper classes.
|
Explain the relationship between wrapper classes and
ArrayList s.Use the
static methods defined in wrapper classes Integer.parseInt() , Double.parseDouble() , and Boolean.parseBoolean() to convert String s to int , double , and boolean values.Explain the circumstances when a primitive type will be autoboxed.
Explain the circumstances when an instance of a wrapper class will be automatically unboxed.
|
Draw a memory diagram of the difference between an
int variable and its value and an Integer variable and its value. |
Math |
Use
static methods from Math class abs() , pow() , sqrt() in mathematical computations, e.g. to write expressions that compute the distance between two points or the length of a hypotenuse of a triangle with given sides.Use
Math.PI in calculations that require the mathematical value π. Or if you’re really cool use Math.TAU |
Use
Math.random() along with casting and other arithmetic operators to produce int or double values in a given range, e.g. an int in the range 1-100, inclusive. |
Use additional Math methods:
min() , max() Find and use more specialized
Math methods for more complex calculations. |