Ok, I know the program underneath won't allow me to put the text line by line in order.
PHP Code:
//Read .txt file
File inFile = new File ("seq.txt");
Scanner in = new Scanner(inFile);
while(in.hasNext())
{
arrayDNA1[counter] = in.nextChar();
arrayDNA2[counter] = in.nextChar();
arrayDNA3[counter] = in.nextChar();
arrayDNA4[counter] = in.nextChar();
counter++;
} //End of while loop
Also, I figured how to do the first array.
PHP Code:
//Read .txt file
File inFile = new File ("seq.txt");
Scanner in = new Scanner(inFile);
while(in.hasNextLine() && counterDNA1 < 8)
{
arrayDNA1[counterDNA1] = in.next().charAt(0);
counterDNA1++;
} //End of while loop DNA Sequence 1
I was told by my TA that I need a separate counter to continue for the rest of the sequence but I really don't understand how to do that. I have tried different ways to get the second arrayDNA2 to work...but is isn't.
PlEASE! HELP ME! It is due friday and I still have sub methods left to analysis the data.