File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
app/pages/learn/01_tutorial/03_getting-to-know-the-language/04_classes_objects Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 1717- Precautions {precautions}
1818- Conclusion {conclusion}
1919description : " Working with enums."
20- last_update : 2024-06-28
20+ last_update : 2024-07-08
2121author : ["DanielSchmid"]
2222---
2323<a id =" intro " >  ; </a >
@@ -71,11 +71,11 @@ switch (someDay) {
7171}
7272```
7373
74- With [ Switch Expressions ] ( id:lang.classes-objects.switch-expression ) ,
74+ With [ switch expressions ] ( id:lang.classes-objects.switch-expression ) ,
7575the compiler can check whether all values of the enum are handled.
7676If any possible value is missing in a switch expression, there will be a compiler error.
7777This is referred to as exhaustiveness checking and can also be achieved with regular classes
78- through [ Sealed Classes ] ( https://openjdk.org/jeps/409 ) and [ Patternmatching ] ( /learn/pattern-matching/#switch ) .
78+ through [ sealed classes ] ( https://openjdk.org/jeps/409 ) and [ patternmatching ] ( /learn/pattern-matching/#switch ) .
7979
8080``` java
8181DayOfWeek someDay = DayOfWeek . FRIDAY ;
You can’t perform that action at this time.
0 commit comments