- package com.itheima;
- public class EasyTest {
- //private static int i=1;
- public EasyTest(int num){
- //System.out.println("构造方法调用"+i+++"次!");
- while(num++<3){
- new EasyTest(num);
- System.out.println(num);
- }
- }
- public static void main(String[] args){
- new EasyTest(0);
- }
- }
复制代码 |
|