DaysAlivePrinter.java.html

  1  public class DaysAlivePrinter
  2  {
  3     public static void main(String[] args)
  4     {
  5        Day jamesGoslingsBirthday = new Day(1955, 5, 19);
  6        Day today = new Day();
  7        System.out.print("Today: ");
  8        System.out.println(today.toString());
  9        int daysAlive = today.daysFrom(jamesGoslingsBirthday);
 10        System.out.print("Days alive: ");
 11        System.out.println(daysAlive);
 12     }
 13  }