The following example results in a compiler exception and needs a cast to execute.
For primitives, I know that the result of arithmetic operations with byte and short result in int and need casting to avoid compiler errors. Number literals are by default int and hence in this example a cast is needed. Am I right?
For primitives, I know that the result of arithmetic operations with byte and short result in int and need casting to avoid compiler errors. Number literals are by default int and hence in this example a cast is needed. Am I right?