Thursday, 22 August 2013

what are the scenarios where System object might throw a null pointer exception?

what are the scenarios where System object might throw a null pointer
exception?

I am preparing for an interview and while I was going through null pointer
exceptions, I suddenly realized every object is somehow capable of
throwing a null pointer exception, but I can't seem to imagine certain
objects like System, Out etc. throwing NullPointerException. Can anyone
mention such scenarios? Thank you!
For example: System.out.println(s.get(name));

No comments:

Post a Comment