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 inner class?

Answer Posted / harish

Inner classes nest within other classes. A normal class is
a direct member of a package, a top-level class. Inner
classes, which became available with Java 1.1, come in four
flavors:
? Static member classes
? Member classes
? Local classes
? Anonymous classes
Let's take a quick look at each in turn.
Briefly, a static member class is a static member of a
class. Like any other static method, a static member class
has access to all static methods of the parent, or top-
level, class.
Like a static member class, a member class is also defined
as a member of a class. Unlike the static variety, the
member class is instance specific and has access to any and
all methods and members, even the parent's this reference.
Local classes are declared within a block of code and are
visible only within that block, just as any other method
variable.
Finally, an anonymous class is a local class that has no
name.

Is This Answer Correct ?    6 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the types of exceptions?

1058


What is the use of toarray () in java?

1071


Are static members inherited to sub classes?

1140


What are the various access specifiers in java?

1002


What are parsers? Dom vs sax parser.

1054


What is the access scope of protected access specifier?

998


Is simpledateformat safe to use in the multithreaded program?

996


How is the marker interface used in Java?

1098


Differentiate between class and structure.

1132


What is a lambda expression ? What's its use ?

1107


What is a class variable?

1036


If we allocate the memory using 'new' & de-allocated using 'free' then what will happen?

1041


What is the purpose of the enableevents() method in java programming?

1181


What is internal iteration in java se 8?

1199


Why we use multi threading instead of multiprocessing?

1065