Hi,
its the first time I have posted here. I am just starting with JAVA and really need some help with a small prgram I have writtem I was messing about so the progrm will probably look a bit dtrange and pointless but the whole point was really just to create an Array, populate it with data and search succesfully on one of the variables. The problem is at the very bottom, I just cant figure out where i am going wrong.
Here is the code
The text file
32 Glasgow 12
George Stephenson
44 Edinburgh 15
Robert McMeachan
21 London 20
John Smith
22 Rochdale 21
Richard Evans
23 Lisbon 23
Frank White
24 Lisboa 250
Gerry McNee
25 Azoia 33
Randall Hopkins
28 Cascais 45
Telly Savallas
56 Estoril 50
Randy Hopkins
============================================================================
And finally the error message!
java.lang.NullPointerException
at Person2.main(Person2.java:59)
Exception in thread "main"
============================================================================
I know I am doing something wrong but cant figure exactly what, any help would be greatly appreciated!
Thanks in advance.
[ edited to format code -ds ]
[ October 31, 2003: Message edited by: Dirk Schreckmann ]