您的位置:首页 > 编程语言 > Java开发

test7.23

2015-09-26 11:34 489 查看
class Flower{
Flower(){System.out.println("Flower");}
static int num=9;

}

public class Lily extends Flower{

Lily(){System.out.println("Lily");}
public static void main(String[] args) {
//Lily lily=new Lily();  
//you can try this operator instead of the following one
System.out.println(new Lily().num);
}

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  Java