We can totally simplify our code by creating a new Rectangle object like this: Rectangle rect = new Rectangle();! This not only creates the object, but it also puts the memory address in the object variable. Keep the address in mind - it's what the object reference stores, not the actual object itself. So when we do Rectangle rect1 = new Rectangle();, just remember that rect1 contains the memory address of our awesome rectangle object! Wow, programming is so cool and fun!
We can totally simplify our code by creating a new Rectangle object like this: Rectangle rect = new Rectangle();! This not only creates the object, but it also puts the memory address in the object variable. Keep the address in mind - it's what the object reference stores, not the actual object itself. So when we do Rectangle rect1 = new Rectangle();, just remember that rect1 contains the memory address of our awesome rectangle object! Wow, programming is so cool and fun!