Display Function for Multiple Objects
Understand the workings of multiple objects on the same instance method.
We'll cover the following...
We'll cover the following...
Problem
Suppose there is a class called Sample that contains a display( ) function. Two objects s1 and s2 are created from the Sample class. Using these objects, the display( ) function is called. How can it be programmatically proved that this method is working on a different object each time it is used?
Coding solution
Here is a solution to the problem above.