As I know, there is good practice use int
variables for arithmetical operations. Because, if we use "byte" or short
JVM regardless cast it to int
in arithmetical operations.
So, I want to ask, where programmers employ byte
and short
in Java.
P.S. Schildt in his book say that byte can be "useful when you're working with a stream of data from a network or file". But I can't find any example's.