import java.io.*;
public class PackageClass {
InputStream input=System.in;
//byte[] b=new byte[1024];
System.out.println("请输入内容:");
//int len=0;
StringBuilder sb=new StringBuilder();
int temp=0;
while((temp=input.read())!=-1){
char c=(char)temp;
if(c=='\n')
break;
sb.append(c);
System.out.println(sb );
}
}
}
|
|