There are a few things to consider.
1) As discussed above, the JVM does not have the concept of bytes or short types. Typically, these types are not used in JVM computing; therefore, you might think that the use of these literals will be less.
2) To initialize bytes and short variables, if the int-expression is constant and in the allowed range of this type it is implicitly cast to the target type.
3) You can always use a literal, ex (short) 10
Barry Feigenbaum Feb 26 '13 at 20:23 2013-02-26 20:23
source share