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...


What is anonymous class?

Answers were Sorted based on User's Feedback



What is anonymous class?..

Answer / niranjanravi

An Anonymous class is a class which is defined at run time
without having any name and it is instantiated and declared
at the same place.
Syntax:
new class classname(){}
new interface interfacename(){}
Keyword extends and implements are usedin this class.
It is always implicitly final.
It is never static or final.

Is This Answer Correct ?    3 Yes 0 No

What is anonymous class?..

Answer / rimjhim

it is a local inner class without any name.
it is instantiated at the time of declaration and must be
extended by a class or implemented by an interface.

new [class name](argument list){anonymous class body};

overridden functions can be declared in this calss and it
can have only one new method inside it.more than one can
not be called anywhere.
using dot operator we can call that new function.

Is This Answer Correct ?    2 Yes 1 No

Post New Answer

More Core Java Interview Questions

Why java Don't Support Multiple interitence

8 Answers   ABC, Exilant, IBM,


Which types of exceptions are caught at compile time?

0 Answers  


What is the differenc between Enemuration interface and iterator interface according to accessing?

4 Answers  


What are the methods used to implement for the key object in the hash map?

0 Answers  


How we get some middle records in one table?

2 Answers   3i Infotech,


What is the major advantage of external iteration over internal iteration?

0 Answers  


java program with complete 4 oops concepts implemented example

0 Answers   Infosys, NIIT,


. Differentiate between instance and local variables.

1 Answers  


What is the method used to get the absolute value of a number?

2 Answers  


Java is Pass by Value or Pass by Reference?

0 Answers   BirlaSoft,


In which language JVM (Java Virtual Machine) is implemented

5 Answers  


Can we have try without catch block?

0 Answers  


Categories