import java.lang.reflect.Method;

public class RefSample2 {

	public static void main(String[] args) throws Exception{
		
		//インスタンスを作成します
		Object instance = Gal.class.newInstance();
		//メソッドを取得します
		Method method = Gal.class.getMethod("play", new Class[0]);
		//メソッドを実行します
		Integer count = (Integer)method.invoke(instance, new Object[0]);

		System.out.println(count);
	}
}
