Hi all,
It appears that when you type in a number in java, the compiler automatically reads it as an integer, which is why when you type in (long) 6000000000 (not in Integer's range) it will complain that 6000000000 is not an integer. To make it shut up, I had to specify 6000000000L. I just learned about this specification.
Are there other number specifications like for short, byte, float, double? It seems like these would be good to have because (I assume) if you could specify the number you're typing in is a short then java wouldn't have to cast it - that is an assumption, correct me if I'm wrong. I would normally search this question myself, but I don't know what this kind of number specification is even called.
Please let me know.
Thanks, jbu