如何使我的实例必须执行某个方法.
例如:
public class A()
{
public void nessary(){}
}在实例化的时候必须执行nessary()方法.要不然会报错