Friday, June 1, 2001 10:51 AM
prints the line number to
standard error (see the API documentation). Perhaps
whatever environment you are working in
(are you using an IDE?)
is capturing your output to standard error.
Note that the Java VM will print out a stack trace
automatically in event of an uncaught runtime exception -
you don't have to put in the code yourself (i.e. try/catch and print
out the trace).
A NullPointerException occurs when
you are trying to invoke a method on a null object reference -
you are probably declaring an object and trying to use it
without creating it first (can't tell, since you don't provide
the relevant code). Maybe one of your input parameters
is a null...