Pass multiple object types to one function
I have a requirement where I have to pass a number of objects to a function and process them by calling a common method, getComments().
I would like to pass any of a number of types of objects, call the getComments() method, parse, then update the original object.
You can think of something similar like passing objects like:
cars, trucks, motorcycles and calling a method like getCurrentValue() (or something similar).
Is this possible?
Thanks much in advance!