Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
student:java:enum [2023/02/20 15:42] – [Enum Types] stewarmcstudent:java:enum [2023/02/24 14:13] (current) – [Enum Types] stewarmc
Line 75: Line 75:
 <code java> <code java>
 Planet[] planetValues = Planet.values(); Planet[] planetValues = Planet.values();
-for (int i = 0; i &lt; 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",
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 &lt; 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",