Howdy all,
Dhwani again:
Does ++b promote byte b to an int?
No.
You can use this code to
test, if it
would promote b to an int, the code should not compile:
If int line two, the byte would be changed into an int, the code could not compile, because there is no int-version of the method, and an int wouldn't fit. Test it by outcommenting the third line and what the compiler thinks about it.
But it compiles as it is. Please don't be surprised about the output...
That would be a different question.
&: Don't mix this ++ up with +=
Because the += operators
do promote conversion:
Without the byte to int conversion in this compound operators (+=, *= ...) you would have to cast manually but it doesn't.
The output will be the lotto numbers of next week.
Bu.