class TestPoint { public static void main(String args[]) { Point a; a = new Point(); a.moveToCenter(); // Use public field a.x = 10; } }