2. 39. 2. Compare date time using before method of Java Calendar
import java.util.Calendar;
public class Main { public static void main(String[] args) {
Calendar old = Calendar.getInstance();
old.set(Calendar.YEAR, 2990);
Calendar now = Calendar.getInstance();
System.out.println("Is old before now ? : " + old.before(now));