+ 7
Yes, the type should be char. But Scanner class doesn't have any separate method to take char input, so take the input as string using next() and consider the 1st character of it as the char input. Scanner scan = new Scanner (System.in); char symbol = scan.next().charAt(0);
18th Oct 2017, 3:42 PM
Shamima Yasmin
Shamima Yasmin - avatar