"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." --- Martin Fowler
Please correct my English.
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." --- Martin Fowler
Please correct my English.
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." --- Martin Fowler
Please correct my English.
Paolo Chimenti wrote:The problem is the this program works only for the first line!
Lester Burnham wrote:Same problem: you're not using the value of "line" in the loop at all.
Generally, before you call StringTokenizer.nextToken you need to call StringTokenizer.hasMoreTokens to check if there are any more tokens.
You should also print out the value of "line" to make sure that it is what you think it is.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime. |