
-----------------------------------
Geostigma
Fri Feb 12, 2010 9:48 pm

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........
]import java.util.*; // Needed for use of Scanner and NoSuchElementException
import java.io.*;

class arrayStorage001{
	
	char

-----------------------------------
DemonWasp
Sat Feb 13, 2010 10:46 pm

RE:Storing data from .txt file.
-----------------------------------
You've never allocated charArray, so of course accessing it throws a NullPointerException. Use new.
