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

Break statement can be used as labels in java?

999


What is the difference between the size and capacity of a vector?

1035


What is a subsequence of a string?

1062


How to find the given number is a prime number or not by getting input from the user

1094


How to compare strings in java?

1001


Can we overload the main() method?

1041


What kind of variables can a class consist?

1053


Explain try and catch keywords in java?

1202


how to handle exceptions in ejb?

2302


What are class types in java?

1071


What is number data type?

1023


Is logger a singleton?

946


Suppose if we have variable ' I ' in run method, if I can create one or more thread each thread will occupy a separate copy or same variable will be shared?

1051


Can a constructor have different name than a class name in java?

1186


Explain the public class modifier?

948