We have two class with same method. When create a object one class and is assigned the another class object.
public Class 1234
{
Public void abcmethod()
{
}
}
Public Class 5678
{
public void abcmethod()
{
}
}
class Program
{
Public static void main()
{
1234 obj1 =new 1234();
5678 obj2;
obj2=obj1.abcmethod();
}
}