Register now or log in to join your professional community.
When you see "NullPointException", it means that you are using a variable that is not instantiated.
Any Java variable you declare, then instantiate by the 'new' keyword, will "point" to a location in memory. It is a reference to this location. NullPointerException is just a name, it could be anything. When you try to use a variable which is NOT YET instantiated, it points nowhere and can do noting. hence the exception.