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

explain Anonynous inner class?

Answer Posted / preetesh

An Anonymous class is an inner class that is not assigned a
name. It is defined and instantiated within arguments of a
method of the Outer Class.

Syntax is as follows:
----------------------
public class OuterClass
{
//some relevant code

methodName(new ClassName(){ }); /*It indicates compiler
that the code between the braces in the argument of the
method defines an anonymours inner class.*/
}

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the access scope of protected access specifier?

1003


What are constructors in java?

1126


What are the steps involved to write rmi based programs?

1027


design an lru cache in java?

1013


What is hashing principle in java?

1035


what is meant by Garbage collection?

1103


What is an enumeration?

1076


Outline the major features of java.

1084


What steps are taken when the OS shifts from one-thread execution to another?

1375


Why scanner is used in java?

1087


What is data object example?

1039


What technique can be employed to compare two strings?

1115


worst case complexities of Quick sort and Merge sort.

1041


What is immutable in java?

1079


Describe the various concepts related to object oriented programming (oop).

1039