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

Now, artificial intelligence can diagnose heart disease, cancer early

Alibaba, Tencent, SoftBank corner Amazon and Uber to become the biggest allies of India’s digital entrepreneurs

It’s going to be a Happy New Year for Artificial intelligence & robotics experts