Here is the code we wrote today: (we also worked on Codingbat problems)

    public void print1() {
        //prints:
        //0 1 2 
        int i=0;
        while(i < 3) {
            System.out.print(i + " ");
            i++;
        }
        System.out.println();
    }
    
    public void print2() {
        //prints:
        //1 2 3 
        int i=0;
        while(i < 3) {
            i++;
            System.out.print(i + " ");
        }
        System.out.println();
    }
    
    public void print3() {
        //prints:
        //2 4 
        int i=2;
        while(i < 7) {
            System.out.print(i + " ");
            i = i*i;
        }
        System.out.println();
    }      
    
    public void print4() {
        //prints:
        //
        //0 
        //0 1 
        //0 1 2 
        int i=0;
        while(i < 4) {
            int j = 0;
            while(j < i) {
                System.out.print(j + " ");
                j++;
            }
            System.out.println();
            i++;
        }
    }