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 we instantiate Interfaces?

Answer Posted / paletipatisrinu

No we can instantiate interface directly.but we can create
instantiate of interface in directly

interface i1
{
public void wish();
}
public class A implements i1
{
public static void main(string...arg)
{
i1 o1=new A();
o1.wish();
}
public void wish()
{
System.out.println("we can create instantiate in directly");
}
}

Is This Answer Correct ?    17 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why should we use singleton pattern instead of static class?

941


What is the old name of java?

1001


What is a boolean used for?

1119


What is generic class?

1098


Explain about core java?

1131


What is the purpose of using the java bean?

1060


What is enhanced loop in java?

999


Detail discussions on JVM, memory management and garbage collector.

991


What is the difference between scrollbar and scrollpane?

1095


What is the difference between stream and buffer?

971


Can we make main() thread as daemon?

1118


What does percent mean in java?

1034


Can we overload the methods by making them static?

1007


Is java a software?

961


How is java hashmap implemented?

1036