public class MyClass { double x; double y; public MyClass(double x, double y) { this.x = x; this.y = y; } }
MyClass pair = new MyClass(2.5,3.5); shapes.add(pair);