java - What happens if I initialize an int variable to something other than an int? -
let's have following line of code:
int number = b/2;
where b odd int. happen?
also, if b instead long, java automatically convert long int? if b char, or else ridiculous?
java widen types automatically, must narrow types cast.
i suggest try might learn something. can't learn program without doing @ point.
Comments
Post a Comment