push
index
 
Name push ()
Description Saves the current state of the turtle to the stack. Enables you to jump back to this state (turtle position, pen state, angle, etc.) at a later point in the program.
Syntax push();
Parameters
None  
Returns None
Related pop()
Example

    Turtle t = new Turtle(this);

    t.push();       //save the current state
    t.right(45);
    t.forward(50);
    t.left(30);
    t.forward(50);
    t.pop();        //return to the previously saved state
    t.forward(100);
    t.drawPath(g);