Having trouble reading external txt file to an array
I can't figure out why I can't create a new array from a text file read in. My code is:
public static void main(String args) throws java.io.IOException
FileInputStream fis1 = new FileInputStream("States.txt");
DataInputStream dis1 = new DataInputStream(fis1);
BufferedReader br1 = new BufferedReader(new InputStreamReader(dis1));
int count = 0;
inline = br1.readLine();
while (!(inline == null))
myStates = new String (inline);
} // end while
The error occurs on myStates = new State (inline);
I have another class named State but it says incompatible types.
Wondering if anyone can figure it out, thanks.