We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents d735465 + bd016a6 commit 609d032Copy full SHA for 609d032
1 file changed
content/language/guarded-patterns.yaml
@@ -10,7 +10,8 @@ modernLabel: "Java 21+"
10
oldApproach: "Nested if"
11
modernApproach: "when Clause"
12
oldCode: |-
13
- if (shape instanceof Circle c) {
+ if (shape instanceof Circle) {
14
+ Circle c = (Circle) shape;
15
if (c.radius() > 10) {
16
return "large circle";
17
} else {
0 commit comments