Suppose that we have a class called class1.
The class1 has a method called method1 and this method gets an object of type class1.
like this:
public class class1
{
//instance members
// property methods
public void method1(class1 obj)
{
//...........
}
}
What does it mean: the method gets an object of this class type? In what scenarios can this be used?
Yep. Nothing odd about that. Why do you ask?
This sort of thing happens all the time. A Set has a method Union which takes another Set. A Giraffe has a method Mate which takes another Giraffe. A Lobster has a method Eat which takes another Lobster. A sequence has a method Concatenate which takes another sequence. And so on.