Complete the code to create a new object of class Car.
Car myCar = new [1]();The correct way to create a new object of class Car is by using new Car().
Complete the code to call the method that destroys an object reference.
myCar = [1];Assigning null to an object reference removes the reference to the object, making it eligible for garbage collection.
Fix the error in the code that tries to finalize an object.
protected void [1]() throws Throwable { System.out.println("Cleaning up"); super.finalize(); }
The method to override for cleanup before garbage collection is finalize().
Fill both blanks to create an object and then remove its reference.
Car [1] = new [2]();
We declare a variable named myCar of type Car and create a new Car object.
Fill all three blanks to create a new object, assign null, and print a message.
Car [1] = new [2](); [1] = [3]; System.out.println("Object reference removed");
We create a Car object named myCar, then assign null to remove the reference.
