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

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

XMLWordPrintable

    • 1.1
    • sparc
    • solaris_2.5
    • Not verified

      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

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: