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

Winapi c++: DialogBox hangs when breaking a loop -

vb.net - Font adding using PDFsharp -

javascript - jQuery iScroll clickable list elements while retaining scroll? -