Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

These methods are often used to read a byte or char character from a stream. Unfortunately many programmers prematurely convert the resulting int back to a byte or char before checking the value for -1. It is vital to check the return value for -1 before narrowing it to a byte or char.

...