Imagine I have a class Family. It contains a List of Person. Each (class) Person contains a (class) Address. Each (class) Address contains a (class) PostalCode. Any "i
Not such a cool idea, but how about catching the exception:
try { PostalCode pc = people.get(0).getAddress().getPostalCode(); } catch(NullPointerException ex) { System.out.println("Gotcha"); }