Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| student:java:enum [2023/02/20 15:42] – [Enum Types] stewarmc | student: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 & | + | for (int i = 0; i < planetValues.length; |
| Planet p = planetValues[i]; | Planet p = planetValues[i]; | ||
| System.out.printf(" | System.out.printf(" | ||
| Line 128: | Line 128: | ||
| double mass = earthWeight/ | double mass = earthWeight/ | ||
| Planet[] planetValues = Planet.values(); | Planet[] planetValues = Planet.values(); | ||
| - | for (int i = 0; i & | + | for (int i = 0; i < planetValues.length; |
| Planet p = planetValues[i]; | Planet p = planetValues[i]; | ||
| System.out.printf(" | System.out.printf(" | ||
