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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you add an arraylist to an array in java?

503


Given a singly linked list, determine whether it contains a loop or not without using temporary space?

578


Does java linked list allow duplicates?

544


What is the use of bufferedreader?

524


What is the difference amongst jvm spec, jvm implementation, jvm runtime ?

500






What methodology can be employed to locate substrings inside a string?

519


What are the approaches that you will follow for making a program very efficient?

636


What is the functionality of the stub?

566


What are the two ways in which thread can be created?

592


How to write custom exception in java?

595


How do you find the maximum number from an array without comparing and sorting?

631


How do you read and print a string in java?

518


how can you take care of mutual exclusion using java threads? : Java thread

603


What is the collections api?

566


How to sort list of list in java?

651