import java.io.BufferedReader;
import java.io.InputStreamReader;
public class MainClass {
public static void main(String args[]) {
try {
System.out.println("enter your name");
InputStreamReader isr = new InputStreamReader(System.in);
BufferedReader br = new BufferedReader(isr);
String str = br.readLine();
System.out.println("You entered "+str);
return;
} catch (Exception e) {
e.printStackTrace();
}
}
}
No comments:
Post a Comment