Details
-
Sub-task
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
4.0.0
Description
Refer to JEP 394
Example:
if (obj instanceof String) { String str = (String) obj; System.out.println(str); }
Can be replaced with
if (obj instanceof String str) { System.out.println(str); }
The new code look more compact
Attachments
Issue Links
- links to