Add java17-features module: runnable demos and captured output for the ankurm.com java17-features article
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
/** Fails to compile on purpose: record fields are final. */
|
||||
public class RecordFieldMutation {
|
||||
record Point(int x, int y) { void move() { this.x = 10; } }
|
||||
public static void main(String[] args) { }
|
||||
}
|
||||
Reference in New Issue
Block a user