Hi,
I have written this this small function which gets input from the command line. Basically this the same part of the code which was working fine in the other part of the code.
void viewCourseDetails(
String login)
{
try
{
String CourseId;
System.out.println("Enter the Course Id: \n");
InputStreamReader isr = new InputStreamReader(System.in);
BufferedReader input = new BufferedReader(isr);
CourseId = input.readLine();
}
catch ( IOException e )
{
System.out.println("IOError: "+ e.getMessage());
}
}
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?