Java has evolved. Your code can too. Every old Java pattern next to its clean, modern replacement — side by side. public class Point { private final int x, y; public Point(int x, int y) { ... } public int getX() { return x; } public int getY() { return y; } // equals, hashCode, toString }

