<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<blockquote>
<div style="margin-left: 40px; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
AFAIK `final class Point2D(int x, int y) {}` does not work? You need the following:</div>
<div style="margin-left: 40px; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="margin-left: 40px; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
```java</div>
<div style="margin-left: 40px; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
class Point(int x, int y) {</div>
<div style="margin-left: 40px; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
private final component int x;</div>
<div style="margin-left: 40px; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
private final component int y;</div>
<div style="margin-left: 40px; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
}</div>
<div style="margin-left: 40px; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
```</div>
<div style="margin-left: 40px; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
So that's the benefit. No need to specify the fields a second time.</div>
<div style="margin-left: 40px;"><br>
</div>
</blockquote>
<div style="margin-left: 40px;"><br>
</div>
<div style="margin-left: 40px;">If you want it to be equivalent to the record declaration, you also have to make the class final (and extend Record.)</div>
<div style="margin-left: 0px; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="margin-left: 0px; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Ah, seems I made some mistakes while copying over the question :facepalm:</div>
</body>
</html>