Since the assignment results in an implicit narrowing primative conversion no cast is needed. If the source is an int constant whos value can be determined to be in the range of the destination type byte short or char then you can omit the type cast.
Posted by CornedBee
Yes, but not if he casts from an int variable.
Yes of course.
Code:
int i = 65;
char c = (char)i;
Just wanted to point out that the cast was not needed with the expression you posted. You never know he might want to take the SCPJ2 exam. Sun sure does get dam pickey.