how can i userinput a char datatyp variable with the scanner import java.util.scanner; Scanner scanner = new Scanner (System.in); char MyChar = (?) | SoloLearn: Learn to code for FREE!

0

how can i userinput a char datatyp variable with the scanner import java.util.scanner; Scanner scanner = new Scanner (System.in); char MyChar = (?)

7/22/2016 9:54:24 PM

Peter Müller

1 Answer

New Answer

+1

char MyChar = scanner.next().charAt(0);