posted 17 years ago
I need help using the instance of scanner to declare a primitive type char. So far I have declared and instantiated the scanner, and I tested the program using more basic primitive types (i.e. int, double, and short)....
System.out.println("Enter an int c")
int c = sc.nextInt();
System.out.println("Enter a double d")
double d = sc.nextDouble();
System.out.println("Enter a short e")
short e = sc.nextShort();
I just don't know what to use for char. Could anyone please help? Thanks.