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 / naresh jangili

no we can't create an object to interface and also abstract because two classes are un implememnted class for every un implemented classes we can create only reference varable.
but for every implemented classes we can create objects.
eg: interface A{
public void test()
}
class B implementes A
{
public void test()
{
s.o.p("hello");
}
public static void main(String argss[])
{
B b=new B(); (object creation)
A a1=null; (reference variable)

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the purpose of javac exe?

1039


What are basic keywords?

1007


Explain when noclassdeffounderror will be raised ?

999


What is array initialization in java?

999


What is illegal identifier in java?

976


How we can skip finally block of exception even if some exception occurs in the exception block in java?

888


What do you mean by synchronized non access modifier?

954


What is the byte range?

987


What is executor memory?

902


Is vector thread safe in java?

1011


How do you pass by reference?

994


What are abstract methods in java?

1076


How do you allocate memory to object?

932


What is formatted output in java?

909


What is locale?

985