Jak wyświetlić wszystkie wartości obiektu A? Próbowałem szukać ale nie wiem jak się za to ugryźć
class A {
private int x;
private int y;
A(int x, int y) {
this.x = x;
this.y = y;
}
}
public class Practice {
public static void main(String[] args) {
A[] ref = {
new A(10, 10),
new A(20, 20),
new A(30, 30)
};
}
}