Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-1240350

Date constructor doesn't work?

XMLWordPrintable

    • generic
    • generic

      Is this a bug? Here's the program:

      ==========
      import java.util.Date;
       
      class DateApp
      {
          public static void main(String args[])
          {
              Date today = new Date(95, 11, 30);
              System.out.println(today);
          }
      }

      =========

      Here's the output:

      =========
      Sat Dec 30 00:00:00 PST 1995
      =========

      Shouldn't "Dec" read "Nov"?

            tlindholsunw Timothy Lindholm (Inactive)
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: