I'm learning to write and read from files, and now I'm gathering content from a .data file bit for bit.
It worked fine at first, but now I get a weird result:
Leser fra fil HaiHus.data
Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(Unknown Source)
at easyIO.In.getCause(In.java:1325)
at easyIO.In.inInt(In.java:986)
at easyIO.InExp.inInt(InExp.java:942)
at easyIO.In.inInt(In.java:945)
at Hybelhus.<init>(Hybelhus.java:34)
This is the content of the file:
1
1
TOM HYBEL
0
2
1
TOM HYBEL
0
3
1
TOM HYBEL
0
What does the error mean?
[ October 06, 2007: Message edited by: Kari Nordmann ]