I am trying to skip the first and the last lines of a file and insert the rest of the information into an ArrayList. Here is what I have so farm to insert ALL elements from a file into an ArrayList.
CodonSequence cs = new CodonSequence();
try {
Scanner scanner = new Scanner(new File("testSequence.txt"));
while (scanner.hasNextLine()) {
cs.addNucleotide(scanner.nextLine());
}
} catch (FileNotFoundException e) {
e.printStackTrace();
}