Computer Science Canada Storing data from .txt file. |
Author: | Geostigma [ Fri Feb 12, 2010 9:48 pm ] | ||
Post subject: | Storing data from .txt file. | ||
I'm trying to store data from a text file and save every letter as a separate character. The file I'm using has carriage returns and some kind of separator that I can't store and causes a null pointer exception. How do I bypass this? EDIT: I forgot to initialize my array lol........
|
Author: | DemonWasp [ Sat Feb 13, 2010 10:46 pm ] |
Post subject: | RE:Storing data from .txt file. |
You've never allocated charArray, so of course accessing it throws a NullPointerException. Use new. |