how do you find the exact variable of a null pointer exception

Posted by OVERTONE on Stack Overflow See other posts from Stack Overflow or by OVERTONE
Published on 2010-04-26T12:46:07Z Indexed on 2010/04/26 12:53 UTC
Read the original article Hit count: 172

I've been at this one for a bit now. I've got a null pointer exception so im guessing somethings not been initialized.

AdminMessages.inbox1.setText(messageRsetArray[0]);

thats my code where its targetting. but i cant find what inside it hasnt been initiazed.

AdminMessages is a class which contains a JTextField called inbox1, messageRsetArray is an array which has taken variables from an array.

also inbox1 is static. i coulndt get the getters and setter to work. i know its bad practice though.

© Stack Overflow or respective owner

Related posts about java

Related posts about nullpointerexception