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 / shankar patil

You can't create an object without method implementations.
Anonymous inner classes allow you to do.

public interface MyInterface {
public void myMethod() ;
}

MyInterface myIntfObj = new MyInterface() {
public void myMethod() {
}
};

myIntfObj.myMethod();

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do constructors use this() and super()?

1051


What is java Applet?

1035


If you do not want your class to be inherited by any other class. What would you do?

947


How many types of design patterns are there?

1045


What does java ide mean?

1057


What do you understand by the term string pool?

960


What initialize variables?

952


Is cout buffered?

1114


What type of language is java?

941


What is the use of static class?

1086


How is tree Mirroring implemented?

1003


How do you do a line break in java?

935


What are nested classes in java?

1039


Differentiate between the constructors and methods in java?

895


Explain the concept of hashtables?

1062