import java.io.*;
public class Maincc {
public static void main(String[] args){
String str;
InputStreamReader st = new InputStreamReader(System.in);
BufferedReader bu = new BufferedReader(st);
try{
System.out.println("请输入:");
str = bu.readLine();
System.out.println(str);
}catch(Exception e)
{
System.err.println("io");
e.printStackTrace();
}
}
}
--------------------------------------华丽的分割线----------------------------
package com.qq.com;
import java.io.*;
public class Maincc {
public static void main(String[] args) throws IOException{
String str;
InputStreamReader st = new InputStreamReader(System.in);
BufferedReader bu = new BufferedReader(st);
System.out.println("请输入:");
str = bu.readLine();
System.out.println(str);
}
}