1。public static void main(String[] args)  //执行主函数!
2。Flower x = new Flower();//下面的构建函数实列化 class Flower 
    Flower() {
      this("hi", 47);
      System.out.println(
        "default constructor (no args)");
      }3。x.print();//执行显示print()方法void print() {
    System.out.println(
      "petalCount = " + petalCount + " s = "+ s);
  }

解决方案 »

  1.   

    楼上的步骤2中this("hi", 47)是执行
    Flower(String s, int petals) 
    接着因为这个方法中有this(petals);
    所以又执行Flower(int petals)
      

  2.   

    这个函数是不是始终没执行?
    Flower(String ss) {
        System.out.println(
          "Constructor w/ String arg only, s=" + ss);
        s = ss;
      }还有
    this.s = s 是什么功能?
    void print()中最后打印出来的s是this.s吗?
      

  3.   

    是的this.s = s 
    把传来的参数赋值给你定义的类属性s