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 are the different collection views provided by maps?

992


Variables used in a switch statement can be used with which datatypes?

999


Can long be null in java?

1023


What is arrays aslist in java?

958


What is meant by interface?

1060


Can constructor be synchronized?

942


What does java final mean?

1045


Is heap stored in ram?

964


What is a boolean field?

961


Difference between character constant and string constant in java ?

1026


What is immutability in java?

1094


What are wrapped classes in java programming?

1061


what is meant by encapsulation?

1085


How to find the index of the largest number in an arraylist java?

1038


Explain method local inner classes ?

1042