import java.io.*;
public class KeyboardInput
{
public static void main( String[ ] args )
{
InputStreamReader isr = new InputStreamReader( System.in );
BufferedReader abcd = new BufferedReader( isr );
try
{
System.out.print( "Enter some characters and press " );
String s = abcd.readLine( );
System.out.println( "The String was: " + s );
abcd.close( );
}
catch( IOException e )
{
e.printStackTrace( );
}
}
}
public class KeyboardInput
{
public static void main( String[ ] args )
{
InputStreamReader isr = new InputStreamReader( System.in );
BufferedReader abcd = new BufferedReader( isr );
try
{
System.out.print( "Enter some characters and press " );
String s = abcd.readLine( );
System.out.println( "The String was: " + s );
abcd.close( );
}
catch( IOException e )
{
e.printStackTrace( );
}
}
}
No comments:
Post a Comment