public static void main(String[] args) { final long a= 24 * 60 * 60 * 1000 * 1000; final long b= 24 * 60 * 60 * 1000; System.out.println(a/
24 * 60 * 60 * 1000 * 1000 this cause numeric overflow since it will consider as an int value. So you will get odd result. You should use long here.
24 * 60 * 60 * 1000 * 1000
int
long
You should use 24 * 60 * 60 * 1000 * 1000L (This is how you define long)
24 * 60 * 60 * 1000 * 1000L
How to initialize long in Java?