Question: public static void main( String[] args ){ World world1 = new World(200, 200); Turtle maria = new Turtle(100, 100, world1); Turtle jose = new Turtle(25,

public static void main( String[] args ){
World world1 = new World(200, 200);
Turtle maria = new Turtle(100, 100, world1); Turtle jose = new Turtle(25, 50, world1); Turtle sara = jose;
maria.forward(50);
maria = jose;
maria.turnRight(); maria.forward(50); jose.forward(50);
jose = new Turtle(0, 100, world1); maria.turnRight(); maria.forward(50);
}
Why are this code only producing 3 objects and 3 references?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!