在win中 回车 表示的是:/r/n 记住!
看看这个例子
public class Test
{
public static void main(String [] args) throws Exception
{
System.out.print("Input a char:");
char ch = (char)System.in.read();
System.out.println("hello" + ch + "AB");
}
}
在win中 回车 表示的是:/r/n 记住!
看看这个例子
public class Test
{
public static void main(String [] args) throws Exception
{
System.out.print("Input a char:");
char ch = (char)System.in.read();
System.out.println("hello" + ch + "AB");
}
}