Here i have to get the value of CourseId from command line. The code compiles fine but at run time it simply prints the System.out statement and exits without any error.
Can anybody please tell me why this is happening?
Please use the CODE button and maintain indentation; then you code will be much easier to read.
I presume you are closing your Readers in a finally block in your "real" code? Why aren't you using a Scanner instead? It is usually easier to use for text input.
Joined: Nov 08, 2009
Hey guys, thanks for your response. It helped me a lot.
I couldn't post the entire code (around 300 lines) as it was very big and also had jdbc related stuff. So probably it would have not compiled on your machines.
Also I had used a lot of Buffered readers and probably that's the reason why some part of the code was not working fine.
But now I used the Scanner class based on Campbell's suggestion and the code is working just fine.
Also please forgive me for the lack of proper indentation in my code, am a novice here.