Question from the Java test

Access the `x` attribute of a `Point` class in Java 17

Expert

In Java 17, how do we access the x attribute of the Point class defined below

record Point(int x, int y) { }

var p = new Point(1, 2);
Author: LoïcStatus: PublishedQuestion passed 316 times
Edit
0
Community EvaluationsNo one has reviewed this question yet, be the first!