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 / arun savoji

This expression instantiates a new object from an unnamed
(called anonymouns inner class)and previously undefined
class, which automatically implements the interface Test.
The class can explicitly implement one, and only one
interface, and cannot extend any class other than Object.

As it implement the Test interface so our anonymous inner
class has to implement the methods in this case we have to
implement wish() method.

In java we can not create instance of an interface, since
interface do not have contructor and as well as defalut
contructor.

Is This Answer Correct ?    9 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why do we need autoboxing in java?

936


Can you pass by reference in java?

935


how does the run() method in runnable work? : Java thread

863


What is the difference between yielding and sleeping?

1027


What do you mean by multithreaded program?

959


What are the differences between forwarding () method and sendredirect() methods?

1053


What is the difference between static and non-static variables in java programming?

911


What are the advantages of exception handling?

1008


What is regex in java?

899


What is a memory leak in java?

1014


Why lambda expression is used in java?

995


What are the problems faced by java programmers who don't use layout managers?

904


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

943


Can sleep() method causes another thread to sleep?

984


What does ide stand for?

876