You should use equals, so don't change to ==. The exception (pun intended) is if there is a possibility that the string you wish to call equals on could be null, in which case you first check for...
Type: Posts; User: copeg
You should use equals, so don't change to ==. The exception (pun intended) is if there is a possibility that the string you wish to call equals on could be null, in which case you first check for...
Because rlinenumRead is not an object, it is null, so by definition a NullPointerException will be thrown. Try using
if ( rlinenumRead == null )
to check for a null value.
Note the readLine int DataInputStream is deprecated (BufferedReader is recommended). Also note that the readLine methods in the readers will return null if the end of the stream is reached.