Seshadri M

Seshadri M

  • NA
  • 69
  • 18.1k

same method with different class implemented

Sep 11 2017 5:28 AM

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

Answers (3)