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

What is the purpose of return statement?

1011


What is lossy conversion in java?

1116


Is array a class in java?

924


What are streams?

1058


Explain the polymorphism principle?

962


What is a final class ?

1080


What is the Scope of Static Variable?

1162


Why singleton class is used in java?

1076


Write an algorithm program in java for the following question.. In a VLSI design techniques,they used rectangles to design circuits. EVery rectangle is to be placed according to x,y coordinates. Check whether or not two rectangles overlap each other. Here overlapping of rectangles is acceptable, if 1) one rectangle intersect with other. 2) one rectangle fully covers other. The time of algorithm should not exceed o(n logn).

2662


What is the format specifier?

877


What is codebase?

943


What are the skills required for core java?

948


Write a program in java to establish a connection between client and server?

925


Is string pool garbage collected?

949


Why there is no call by reference in java?

874