PPT Slide
Instance Creation with new
Body sun = new Body( );
sun.idNum = Body.nextID++;
sun.name = "Sol ";
sun.orbits = null;
Body earth = new Body( );
earth.idNum = Body.nextID++;
earth.name = "Earth";
earth.orbits = sun;
"Earth"
"Sol"
Previous slide
Next slide
Back to first slide
View graphic version