Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
student:java:enum [2023/02/24 14:13] – [Enum Types] stewarmcstudent:java:enum [2023/02/24 14:13] (current) – [Enum Types] stewarmc
Line 128: Line 128:
         double mass = earthWeight/EARTH.surfaceGravity();         double mass = earthWeight/EARTH.surfaceGravity();
         Planet[] planetValues = Planet.values();         Planet[] planetValues = Planet.values();
-        for (int i = 0; i < planetValues.length; i++) {+        for (int i = 0; i planetValues.length; i++) {
             Planet p = planetValues[i];             Planet p = planetValues[i];
             System.out.printf("Your weight on %s is %f%n",             System.out.printf("Your weight on %s is %f%n",