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

How to display all the prime numbers between 1 and n (n is the number, get the input from user)

928


What is difference between overloading and overriding in java?

967


What is the protected method modifier?

988


What are the steps in the jdbc connection?

959


Write a code to show a static variable?

1032


what is static import in java? Explain

960


What are dot operator queries?

1055


Can inner class have constructor?

987


How do you check if a string contains only numeric digits?

1066


How many ways can you break a singleton class in java?

915


What is data and its types?

952


What is serialization in java?

1005


What do you mean by flow of struts?

1224


What is a jit compiler?

1072


Difference between class#getinstance() and new operator ?

1137