how can we take charecter input
Taking charecter input
hey @missroy We cannot directly take Character Input using Scanner class but we can use
char ch = scn.next().charAt(0);
this piece of code will scan a string and from that string it will take out character at index zero.
getting the same char that you want.
You can ask as many doubt as you want I will be happy to acknowledge them.
If I was able to clear your then please mark your doubts as resolved and do provide me rating.
im trying to print charecter array but it is giving an error
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.
ok i got it i have to take charecter only not charecter array