0
Why casting is needed in JAVA ?
byte a = -128; byte b = (byte) (a/2); Can we write it without byte part ? On which cases casting is needed?
1 Odpowiedź
+ 2
if the destination variable is smaller than source variable then we need casting...like..
if u want to convert long into int or int into byte