Question: Suppose the same method is called twice in the following snippet: obj1.drive(obj2) obj3.drive (obj4) What do you infer about the types involved? Note: if you've

 Suppose the same method is called twice in the following snippet:

Suppose the same method is called twice in the following snippet: obj1.drive(obj2) obj3.drive (obj4) What do you infer about the types involved? Note: if you've looked ahead and know what "inheritance" is, assume there is no explicit inheritance by any of the classes involved (if you don't know what inheritance is, ignore this note). obj2 and obj4 are different types obj1 and obj3 are different types obj1 and obj2 are different types obj2 and obj4 have the same type obj1 and obj 3 have the same type

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!