Skip to content

Commit b9dd3b3

Browse files
authored
Fix incorrect IO.println reference in Java 16+ example
1 parent b854d78 commit b9dd3b3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

content/language/pattern-matching-instanceof.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ oldCode: |-
1616
}
1717
modernCode: |-
1818
if (obj instanceof String s) {
19-
IO.println(s.length());
19+
System.out.println(s.length());
2020
}
2121
summary: "Combine type check and cast in one step with pattern matching."
2222
explanation: "Pattern matching for instanceof eliminates the redundant cast after\

0 commit comments

Comments
 (0)