use pattern variables

This commit is contained in:
dfsek committed 2021-11-27 08:34:03 -07:00
1 parent 2d316fa042
commit 2307897b31
16 files changed
+33 -58

No files matched your search

@@ -34,8 +34,7 @@ public class Point {
@Override
public boolean equals(Object obj) {
if(!(obj instanceof Point)) return false;
Point that = (Point) obj;
if(!(obj instanceof Point that)) return false;
return this.x == that.x && this.z == that.z;
}
}