import java.util.*; public class TestExceptions{ public static void main(String[] args) { //Null pointer exception LinkedList list=null; list.add(5); //array index out of bounds exception int[] array = new int[5]; array[6]=5; //doing bad things casting up and down the inheritance hierarchy Object obj = new String("hello"); Integer testInt = (Integer)(obj); } }