public void MaxId(){
 this.st=cn.getStatement();  1
}构造方法不要加上返回值void,应该为
public MaxId(){
 this.st=cn.getStatement();  1
}
加上就变成了普通方法,除非你调用才会执行