public static void main(String[] args) { MyClass a = new MyClass(); a.setData(100); System.out.println(a.getData()); }