code:
public class Main{ public static void main(String[] a){ long t=24*1000*3600; System.out.println(t*25); System.out.println(2
Integral literals are treated as type int by default. 24*1000*3600*25 is greater than Integer.MAX_VALUE so overflows and evaluates to -2134967296. You need to explicitly make one of them a long using the L suffix to get the right result:
int
24*1000*3600*25
Integer.MAX_VALUE
long
System.out.println(24L*1000*3600*25);