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

Demo (Clock) compiled with jdk1.1p -> deprecated methods used in demo

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      1.1
    • CPU:
      sparc
    • OS:
      solaris_2.5
    • Verification:
      Not verified

      Description

      The demos in jdk1.1p were compiled with the jdk1.1p compiler
      (/usr/local/java/jdk1.1/solaris/...) -- when the source file (Clock2.java)
      for the Clock demo was compiled, the compiler returned the following
      (5 warnings):

      Clock2.java:43: Note: The method java.lang.String toLocaleString() in class java.util.Date has been deprecated. Please consult the documentation for a better alternative.
        String lastdate = dummy.toLocaleString();
                                              ^
      Clock2.java:100: Note: The method int getSeconds() in class java.util.Date has been deprecated. Please consult the documentation for a better alternative.
        s = dat.getSeconds();
                          ^
      Clock2.java:101: Note: The method int getMinutes() in class java.util.Date has been deprecated. Please consult the documentation for a better alternative.
        m = dat.getMinutes();
                          ^
      Clock2.java:102: Note: The method int getHours() in class java.util.Date has been deprecated. Please consult the documentation for a better alternative.
        h = dat.getHours();
                        ^
      Clock2.java:103: Note: The method java.lang.String toLocaleString() in class java.util.Date has been deprecated. Please consult the documentation for a better alternative.
        today = dat.toLocaleString();
                                  ^
      5 warnings

        Attachments

          Activity

            People

            Assignee:
            busersunw Btplusnull User (Inactive)
            Reporter:
            lminersunw Linda Miner (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: