java中的接口问题
interface Num
{
int num=10;
public void printNum();
}
public class TestNum implements Num
{
public void printNum()
{
System.out.println("num="+ num);
}
public static void main(String args[])
{
System.out.println("the program is right!");
}
请问哪位大虾知道,为什么在调试程序时,只打印出the program is rigth! 而没有打印出num的值呢?