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

Date constructor doesn't work?

    XMLWordPrintable

Details

    • generic
    • generic

    Description

      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"?

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: