JAVA菜鸟请教!急知道答案!3Q

来源:百度知道 编辑:UC知道 时间:2024/07/01 06:12:51
public class ReadHello
{
public static void main(String[]args)
{
int inChar;
System.out.println("Enter a Character:");
try{
System.out.println("You entered" + System.in.read());
{
Catch (IOException e);
}
System.out.println("Error reading from user");
}
}
}

import java.io.IOException;

public class Test{
public static void main(String[]args){
int inChar;
System.out.println("Enter a Character:");
try{
System.out.println("You entered" + System.in.read());
}
catch (IOException e){
System.out.println("Error reading from user");
}
}

}
兄弟 弄个java开发用的平台软件吧 ~~挺简单的程序~~被你弄的复杂了许多~~哈哈哈 呵呵 菜鸟问题~~~~凑个热闹
这段程序的意思 貌似是 让你输入键盘输入任意键然后输出相应的ASCII码 而且只能接收一个字符

???什么意思

把你输入的字符从后台打出来