nothing difficult, but java compiler says: "possible loss of precision; found: double, required: long"
long MaxN = 10e12;
but compiler replied: "integer number too large"
long MaxN = 1000000000000;
DrLaszloJamf wrote:And if you're going to do something like this, put the "L" on the first constant, not the last. It's okay in the above example, but if you insert another "* 1000" into that expression it won't work.
I hate it when literals that long end up in code. I have to squint and count zeros. I would prefer:or some other factoring that makes sense in the context. (Note that the L is still needed -- check and see what happens without it ;-)
long MAX = 1000 * 1000 * 1000 * 1000L;