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();
}
}

Rahul KaushikRank #2,112 · 676 reputationPosted Sep 11, 2017, 3:34 AM EDT
Ramesh PalanivelRank #372 · 6.8K reputationPosted Sep 11, 2017, 2:07 AM EDT
Tapan PatelRank #614 · 3.9K reputationPosted Sep 11, 2017, 5:23 AM EDT