+ 2
what is the correct method of inserting a char variable in java program?
2 ответов
+ 13
If you mean input, there is no nextChar() method in Scanner class. You may try the following way:
Scanner sc = new Scanner(System.in);
char a = sc.next().charAt(0);
+ 2
yes finally
it works...
thanku yassu😊😊