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

What is %d in printf?

1040


What is a double vs float?

1010


Can singleton class be cloned?

1052


What is the use of static methods?

1041


What is a boolean flag in java?

1029


Can a static method be final?

1055


What is the role of garbage collector in java?

968


How are the elements of a gridbaglayout organized in java programming?

981


What is object-oriented programming?

1122


Can we use return in constructor?

948


Explain the inheritance?

970


What is the difference between abstraction and encapsulation?

1048


Difference between object instantiation and construction ?

1066


What is time complexity java?

991


Explain about serializable interface in java?

997