Your code works fine for me..
i get the output as that of the file.
your output is obtained only when there is a space in the file. You could check comparing the output with space.
Please try out with some other files to read...... and i feel its the error is with the file you read.
I dont know why it doesnt work for me.. I dont have any spaces in input file.. I cant attach my txt file..anybody knows how can i attache my input file? this forum doesnt allow me to attach txt files.
your code work properly in my netbean.... Could you tell me what IDE are you using and what's your OS? Have you try run your code in a virtual machine in your PC?
ken jun wrote:your code work properly in my netbean.... Could you tell me what IDE are you using and what's your OS? Have you try run your code in a virtual machine in your PC?
I am using Eclipse Helios on Windows 7...
Does it matter? Java is suppose to be platform independent.
ken jun wrote:your code work properly in my netbean.... Could you tell me what IDE are you using and what's your OS? Have you try run your code in a virtual machine in your PC?
I am using Eclipse Helios on Windows 7...
Does it matter? Java is suppose to be platform independent.
I know java is suppose to be platform independent. i just want to know your IDE and OS, it doesn't matter
The harder I work, the luckier I get. -Sam Goldwyn So tiny. - this ad: