越狱主演米勒图片:看看这个JAVA程序

来源:百度文库 编辑:高考问答 时间:2024/04/29 19:57:45
这是辅助用的:从键盘中读入一个字符串
public class Pyc
{
public static String getMyString()
{
String a="";
char nextChar=' ';

boolean b=false;
do{
try{

nextChar=(char)System.in.read();
}
catch(Exception e)
{
System.out.println(e.getMessage());
}
if(nextChar=='\n')
b=true;
else if (nextChar=='\t')
{

}
else
a=a+nextChar;

}while(b==false);
return a;
}
}
sorry ,还有文件丢失了

程序怎么了?
读入字符串可以用SavitchIn类阿
这个类是专家写的,安全性很好啊
网上有很多,自己取下载一个把

这个程序是有些问题 不能运行 应该是异常出现问题了 但不知道你要对这个程序做什么?