1
0
0
0
1
1
1
Have a text file that has to be read line by line to code below in the array, however it only stop at the first line. As in it gets the first ineger "1" and doesn't get to the rest of the integers, line by line
String fileName = "input.txt";
File file = new File(fileName);
Scanner scanner = new Scanner(file);
// String s = "";
while(scanner.hasNextLine()){
data1 = scanner.nextLine();
}
for ( int i = 0; i < data1.length(); i++)
{
covertDataArray[i] = Byte.parseByte(data1.substring( i, i+1));
}