Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

can you create interface instance ?

Answer Posted / saroj singh

we can create instance of Interface like..


interface Imployee
{
void Pay();
void Salary();
}

class SeniorSoftEngg : Imployee
{
public void Pay()
{
Console.WriteLine("Inside Pay");
}
public void Salary()
{
Console.WriteLine("Inside Pay");
}
}
class Program
{
static void Main(string[] args)
{
Imployee Emp = new SeniorSoftEngg();
Emp.Pay();
Emp.Salary();

}

}

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Are primitives objects?

1008


What is a get method?

989


What do you mean by stream pipelining in java 8?

1166


Why do we need variables?

933


How to compare strings in java?

929


Why do we need data structure in java?

1029


How do you check if a string contains only numeric digits?

1077


How to sort a collection of custom Objects in Java?

1012


Is null or empty java?

939


What is the default size of load factor in hashing based collection?

998


Can static method access instance variables ?

1077


What is the use of join method?

974


Can a static class have a constructor?

975


Explain jvm, jre, and jdk?

962


Which programming language is most secure?

943