The JVM wrote:at Vocabularymain.zeilegeben(Vocabularymain.java:54)
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
Rob Spoor wrote:Although it's not the cause of the NullPointerException, your call to linie.split("$") is wrong. The split method takes a regular expression, and $ has a special meaning in regular expressions. You must escape it:
Paul Clapham wrote:I think your line counting might be off by one. However the easiest thing to do is to put some debugging statements into your code to see what's happening. Like
for example.
Also, "String" is one of the worst possible variable names you could ever choose in Java. Whenever I see that I think of the type "String" and I have to force myself to realize that it's actually a variable name. Very confusing.
It will confuse the compiler, too; it will assume String means the variable, and may give errors if you use the type String.Paul Clapham wrote:. . . "String" is one of the worst possible variable names you could ever choose in Java. Whenever I see that I think of the type "String" and I have to force myself to realize that it's actually a variable name. Very confusing.
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
No. No. No. No. Changed my mind. Wanna come down. To see this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
|