看看这段程序,哪个大哥解释下!
class insert{int i=9;
int j;
public insert(){prt("i=" +i+",j="+j); j=39;}
static int x1=prt("static x1");//静态的方法
static int prt(String s){
System.out.println(s);
return 49;
}
}
public class battle extends insert{
int k=prt("bettle k");
battle()
{ prt("k=" +k);
prt("j=" +j);
}
static int x2=prt("static bettle x2");
static int prt(String s){
System.out.println(s);
return 63;
}
public static void main(String[]args)
{ int p=prt("bettle constructor");
battle b=new battle();
System.out.println(p);
}
}
输出结果是什么呢?