Which method is used to read a single character from a character input stream in Java?

  • read()
  • readChar()
  • readCharacter()
  • readLine()
The read() method in Java's character input stream classes is used to read a single character at a time. It returns an integer representing the Unicode code point of the character read. The other options are not valid methods for reading a single character from a character input stream.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *