0
How can I read a char?
7 Answers
+ 7
You must creat infinitive loop and then inside loop, read string, then check string length, if was 1, get first index of string and then break loop, else continue loop for read again.I hope this helps.
+ 3
i think first read the string then convert it into char.i am sure about this.
+ 3
Import java.io.Filereader;
Public class A{
Public static void main (String[] args ){
try {
Filereader fr = new Filereader ("path");
fr.reader(char);
}catch( Exception e){}
}
}
+ 2
char cannot be read in java
+ 2
You could try to read your char as byte and type cast it to char. What do you think of this idea, @Jawad?
+ 2
Yes, to it as String should be easier. You are right.
+ 2
charAt(i);