码迷,mamicode.com
首页 > 其他好文 > 详细

黑马程序员-学习日记 面向对象(构造函数专题篇)

时间:2014-11-28 14:04:49      阅读:104      评论:0      收藏:0      [点我收藏+]

标签:style   blog   ar   color   sp   on   div   log   bs   

class Father
{
    Father(int a)
    {
        System.out.println("father run");
    }
}

class Son extends Father
{
    Son()
    {
     Super(2); System.out.println(
"son run"); } Son(int a) {
     Super(4); System.out.println(
"son run a"); } } //ExtendsDemoFour class singleMode { public static void main(String[] args) { Son s = new Son(); Son s1 = new Son(); } }

 

黑马程序员-学习日记 面向对象(构造函数专题篇)

标签:style   blog   ar   color   sp   on   div   log   bs   

原文地址:http://www.cnblogs.com/tozr/p/4128267.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!