When java does not support pointers why does it throws NullPointerException?

When java does not support pointers why does it throws NullPointerException?
Ans = When we call method on reference variable that holds null then there is a possibility of getting NullPointerException. Here the word pointer is no way related to c,c++ pointers it is used purely by having dictionary meaning say indicating method is invoked on reference variable that points to null value.

Comments

Post a Comment

Popular posts from this blog

Apple apologises to users over slowing down older iPhones; slashes battery replacement costs by $50

Digital, People and Data are likely to dominate in 2018: Virtusa CIO Madu Ratnayake