I get an unknown source error when I try to use the Scanner class.
fabric is the name of my Scanner ojbect.
while(fabric.hasNext())
{
fabricID[fabricCounter] = fabric.nextInt();
name[fabricCounter] = fabric.next();
description[fabricCounter] = fabric.next();
price[fabricCounter] = fabric.nextDouble();
qty[fabricCounter] = fabric.nextInt();
vendor[fabricCounter] = fabric.next();
fabricCounter++;
System.out.println("made it down here");
}//end while
fabric.close();
}//end try
catch(IOException e)
{
System.out.println("Nope on the reader");
}//end catch
System.out.println(fabricID[2]);
System.out.println(name[2]);
System.out.println(description[2]);
System.out.println(price[2]);
System.out.println(qty[2]);
System.out.println(vendor[2]);
But if I change my while(fabric.hasNext()) to while(fabric.hasNextInt()) it skips over the whole while section.
What am I missing with Scanner? Any help is greatly appreciated.