Is there any case where StringTokenizer.nextToken will return null? I'm trying to debug a NullPointerException in my code, and so far the only possibility I've found is that the string returned from nextToken() returned null. Is that a possibility? Didn't find anything in the java doc.
Thanks
nextToken() throws NoSuchElementException if there are no more tokens in the tokenizer's string; so I would say that it doesn't return null.
http://download.oracle.com/javase/1.4.2/docs/api/java/util/StringTokenizer.html#nextToken()
I think it can throw a NullPointerException.
Inspecting the code of nextToken(),
Here, invocation of the method skipDelimiters() can throw NullPointerException.