your code:
String item; // a String object
while (item != 999) // String compares to integer
You are comparing a String object to an integer. if you want that kind of comparison, you better parse the String to integer first then do the comparison
Scan1.java:30: error: cannot find symbol
outFile.Println("Item Name Item Price");
^
you don't have outFile variable, but you do have outfFile variable
PrintWriter outfFile = new PrintWriter ("Invoice.txt");, please check the spelling.
but, it would still have an error since PrintWriter class doesn't have an
Println method, but it has
println.
Println is different from
println, java is a case sensitive programming language.