您的位置:首页 > 其它

关于构造函数的重载 用this语句的调用问题

2011-12-04 23:48 465 查看
 
public class Overload

{

                   public Overload()

           {           

               this(3);

               System.out.println("gogogo");

             }

              public Overload(int i)

             {

                          System.out.println("GOGOGO");

             }

                 public static void main(String[] args)

          {

                 Overload ol = new Overload();

           }

 }

//打印为GOGOGO

  //    gogogo

//    此为关于构造函数重载与this 语句的调用问题
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  string class
相关文章推荐