Java doesn’t use pointers, but uses references.
NullPointerException is a way to say that an attempt is made to send a message (invoke a method) using reference which doesn’t point to any object. It has nothing to do with pointers in the sense of C/C++.
solved What does null pointer exception mean in error messages? [duplicate]