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

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -