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 declare an anonymous class as both extending a class
and implementing an interface?

Answers were Sorted based on User's Feedback



Can we declare an anonymous class as both extending a class and implementing an interface?..

Answer / devnaga

No. An anonymous class can extend a class or implement an
interface, but it cannot be declared to do both

Is This Answer Correct ?    26 Yes 0 No

Can we declare an anonymous class as both extending a class and implementing an interface?..

Answer / ravikiran

Yes

Is This Answer Correct ?    3 Yes 1 No

Can we declare an anonymous class as both extending a class and implementing an interface?..

Answer / imtiyaz

sorry i will take back my words...
as Devnaga said anonymous class will be created by extending
a class or implementing interface.
you can't to do both at a time simply saying

new SomeClass() extends someOther

we can't write in the same way

new SomeClass() implements someOther

we Can't That's it

Is This Answer Correct ?    3 Yes 2 No

Can we declare an anonymous class as both extending a class and implementing an interface?..

Answer / devarathnam

Hi... Yes we can declare anonymous class either extending a
class or implementing an interface but not both.

Is This Answer Correct ?    2 Yes 1 No

Can we declare an anonymous class as both extending a class and implementing an interface?..

Answer / rohit

plz giv an example......

Is This Answer Correct ?    3 Yes 2 No

Can we declare an anonymous class as both extending a class and implementing an interface?..

Answer / devnaga

Yes. U r right. U can fin it from
http://dev.fyicenter.com/interview/java_8.html

Is This Answer Correct ?    0 Yes 1 No

Can we declare an anonymous class as both extending a class and implementing an interface?..

Answer / abhishek

Thanks all..

Is This Answer Correct ?    0 Yes 1 No

Can we declare an anonymous class as both extending a class and implementing an interface?..

Answer / imtiyaz

upto my knowledge anonymous class can not extend or
implement another class if so can anyone give the example

Is This Answer Correct ?    4 Yes 7 No

Post New Answer

More Core Java Interview Questions

how to prepare for IT Officers Interview in Banks

0 Answers   TATA, Tata Steel Limited,


Explain how hashmap works?

0 Answers  


What is use of super keyword in java?

0 Answers  


List out benefits of object oriented programming language?

0 Answers  


How to sort array of 0 and 1 in java?

0 Answers  


What's the difference between int and integer in java?

0 Answers  


What is difference between variable declaration and definition?

0 Answers  


What is the specification of ?CODEBASE? in an applet?

1 Answers  


Explain illegalmonitorstateexception and when it will be thrown?

0 Answers  


What is derived datatype?

0 Answers  


What is charat ()?

0 Answers  


write a program that list all permutations of ABCDEF in which A appears before B?

0 Answers   Nissan,


Categories