Hello All,
I am trying to parse a text file with the following type lines:
Mr. Jones has a "dog" and a "cat"
I need to extract the dog and cat and put them into an array of Items.
Here is the set up:
character = read.read();
char first = file.indexOf('\"');
char second = file.indexOf('\"') ;
Here is a snippet of my code:
while(character != EOF)
{
for(int i = 1; i < animal.length; i++)
{
String name1 = animal[i].substring(first, second);
for(int j = 1; i < animal.length; j++)
String name2 = animal[j].substring(first, second);
System.out.println(name1);
System.out.println(name2);
}
}
I am lost on this. Any help would be greatly appreciated.
Thanks