按他给的代码敲的,那里错了
package com.taozui;
public class tz{
int num1;
int num2;
static int num3;
public tz() {
num1=91;
System.out.println("通过构造方法为变量num1赋值");
}
{
num2=74;
System.out.println("通过初始化块为变量num2赋值");
}
static {
num3=83;
System.out.println("通过静态变量初始化块为静态变量num3赋值");
}
public static void main(String[] ages){
tz hello=new tz();
System.out.println("num1:"+tz.num1);
System.out.println("num2:"+tz.num2);
System.out.println("num3:"+num3);
tz hello2=new tz();
}
}