{求助}~~~
java 中怎样实现从键盘读入单个字符?
import java.util.Scanner;
public class Test
{
public static void main(String arg[])
{
Scanner input = new Scanner(System.in);
System.out.print("输入整数:");
int i = input.nextInt();
System.out.println("i=" + i);
System.out.print("输入字符串:");
String s = input.next();
System.out.println("s=" + s);
System.out.print("输入浮点数:");
float f = input.nextFloat();
System.out.println("f=" + f);
System.out.print("输入单个字符:");
char b = input.nextChar();//这样写为什么是错误的.请教大嘴大哥..
System.out.println("b=" + b);
}
}