- Packages
- Reading Java documentation
- Using an example of documentation (Date)
- Handling Exceptions
- unchecked and checked exceptions
- throw and throws
- the try-catch statement; finally, try-with-resources
- Use static methods of java.util.Arrays and java.lang.Integer.
- Implement a dynamically resizing ArrayList class storing int values in an array; operations are: get(i), set(i,n), add(n), insert(i,n), remove(i).
void myMethod() {
//Throwing single exception using throw
throw new ArithmeticException("An integer should not be divided by zero!!");
}
Handle the exceptions on the last class Exercise.