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

java.text.DateFormat API Example Incorrect.

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b49
    • CPU:
      generic, sparc
    • OS:
      generic, solaris_9
    • Verification:
      Not verified

      Description

      See: http://java.sun.com/j2se/1.4.1/docs/api/java/text/DateFormat.html

      Be aware that there is a small error in the API documentation for DateFormat.
      The exaple code given:

      DateFormat df = DateFormat.getDateInstance();
      for (int i = 0; i < a.length; ++i) {
          output.println(df.format(myDate[i]) + "; ");
      }
       
      Should be:

      DateFormat df = DateFormat.getDateInstance();
      for (int i = 0; i < myDate.length; ++i) {
          output.println(df.format(myDate[i]) + "; ");
      }

        Attachments

          Activity

            People

            Assignee:
            shommel Scott Hommel (Inactive)
            Reporter:
            jwbuckle Joel Buckley (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: