I’ve been doing some date math at work and I came across something I thought was wack.
Check this out:

Calendar cal1 = Calendar.getInstance();
Thread.sleep(500);
Calendar cal2 = Calendar.getInstance();
Thread.sleep(500);
Date now = new Date();

System.out.println(cal1.before(cal2));
System.out.println(cal1.before(now));
What do you think this snippet prints (It compiles, I promise!)?
Looking at the code, it shows that we are getting three snapshots in time, waiting half a [...]