1. Suppose my_car is the name of a variable that references an object, and go is the name of a method. Write a statement that uses the my_car variable to call the go method. (You do not have to pass any arguments to the go method.)
The following statement that uses the my_car variable to call the go method is as follows:
my_car.go()
Explanation:
my_car
is the references the object.The method "go()
"is called on the my_car
object.go'
indicate that it is a method call, and since no arguments are being passed, they are left empty.