Interface and Abstract Class Can have same method or not

P

prabhat tiwari

Suppose a interface having one method "GetName" as
interface I1
{
void GetName();
}

and have a abstract class

abstract calss C1
{

public Abstract void GetName();
}


Class C2:C1,I1
{
public void Override GetName()
{
////Code of class
}



When we create object of C2
in this way

C2 obj= new c2;


obj.GetName will work or not
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,733
Messages
2,569,439
Members
44,829
Latest member
PIXThurman

Latest Threads

Top