When I multiply long
s with L
prefix I get the result 31536000000
.
When I multiply long
s without L
prefix I get the result 1471228928
.
How the result getting varies?
I am thinking number exceeds the `int? range but not sure.
long longWithL = 1000*60*60*24*365L;
long longWithoutL = 1000*60*60*24*365;
System.out.println(longWithL);
System.out.println(longWithoutL);
Output:
31536000000
1471228928