In order to return values that can't be represented in data type byte
.
An unsigned integer is zero or positive.
In Java (regardless of computer platform)
the primitive type byte
holds an integer in the range byte
is needed.
Data type int
is returned because it is used more
often than the other integer types.
(Review: ) What happens when readInt()
reaches the end of the file?