1. Passing Objects as a Parameter to Method.
We have seen that methods can take parameters as input and process them.
It is also common to pass objects as a parameter to methods.
2. Method overloading with object as a parameter.
A method can return any type of data, including class type (object) that you create.
RetObj multiply(RetObj p1, RetObj p2) This is the syntax in our program which has return type object.
obj3 = obj3.multiply(obj1, obj2); this is the syntax which calls method multiply and return object, it will store in obj3.