从键盘输入数据的例题
-------------------------------------------------------------
import java.io.*;
public class app3
{
public static void main(String args[])throws IOException
{
BufferedReader buf;
String str;
buf=new BufferedReader(new InputStreamReader(System.in));
System.out.print("请输入字符串:");
str=buf.readLine();
System.out.print("您输入的字符串是:"+str);
}
}
-------------------------------------------------------------
import java.io.*;
public class app3
{
public static void main(String args[])throws IOException
{
BufferedReader buf;
String str;
buf=new BufferedReader(new InputStreamReader(System.in));
System.out.print("请输入字符串:");
str=buf.readLine();
System.out.print("您输入的字符串是:"+str);
}
}