Lines you have commented (declaration and assignment of ProdName/quantity) are not bad or unuseful. They serve as the base for the rest you still need to do.
You have asked for other things:
1)...
Type: Posts; User: andbin
Lines you have commented (declaration and assignment of ProdName/quantity) are not bad or unuseful. They serve as the base for the rest you still need to do.
You have asked for other things:
1)...
Yes, sorry, I have not told you to change
StringTokenizer line;
to
String line;
Remember: readLine() returns a String ... not a StringTokenizer!
line is a String ... not a StringTokenizer.
while (line != null) {
StringTokenizer tokenizer = new StringTokenizer(line);
ProdName = tokenizer.nextToken();
quantity =...