I am having a problem...I get arrays but when I have to read a line by line text with letters I don't understand how to place the letters in four different array.
Import java.util*; import java.io.*; public class.... public static void main(String[] args) { char[] array1 = new char[8]; char[] array2 = new char[8]; char[] array3 = new char[8]; char[] array4 = new char[8]; Scanner inFile = new Scanner (new File ("filename")); while() //Been told that I must have a while loop to fill in the four arrays. { } }
I have 32 lines, each line has a letter. I need to place the first eight line into one array, and the then following eight to the next, and so on and then print out array.
I have no idea what to do and have read other forums but for some reason I don't understand.
Please help.