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

java - javaOO - Remove unused methods in enum code sample

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P5 P5
    • None
    • 6-pool
    • docs
    • generic
    • generic

      At URL: http://download.oracle.com/javase/tutorial/java/javaOO/enum.html
      you use at example on Planet enum, two methods, that are unused in the exercise and that can create confusion in a student (like me :) ) that read the exercise:
      infact, the:

      private double mass() { return mass; }

      private double radius() { return radius; }


      are not used in the exercise, and the name of the methods is equal to:

      private final double mass; // in kilograms

      private final double radius; // in meters

      that can generate confusion.

            Unassigned Unassigned
            skannan Sowmya Kannan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: