//修改public void hitTank(Shot s,tank tank){ tank.islive = false; }//父类
public class tank { private int x; private int y; private int direct; private int speed =10; boolean islive = true; }//子类
public class Hero extends tank { // Shot shot =null; Vector<Shot> shots = new Vector<>(); boolean islive =true; }
方法hitTank(Shot s,tank tank) 传入子类 Hero 此处仅修父类的参数