找出下列程序的错误并改正
class A {
public int num = 10;
public static int num2 = 20;
public void function() {
System.out.println("function方法执行了---------------");
}
public static void function2() {
System.out.println("function2方法执行了---------------");
}
public static void function3() {
System.out.println(num);
System.out.println(num2);
function();
function2();
}
}
class Test {
public static void main(String[] args) {
A.function3;
}
}
|
|