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 static and a non-static inner class?

Answer Posted / p.nandakishore

non static inner classes can access all the members of the
outer class i.e both static and nonstatic members.In
nonstatic inner classes we cannot have static declarations
done.To access non static inner class members we outer
class reference.

static inner classes can access only static members of the
outer class.In static inner class we can have static
declarations done. To access static inner class members
no need of outer class reference.

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I stop concurrentmodificationexception?

1079


Is passing by reference faster?

1047


Can we access instance variables within static methods ?

1152


How do I type unicode?

1027


what is anonymous class in java?

1089


How do you check if a number is a perfect square?

1033


How many bits is a float?

1060


How to read and write image from a file ?

1100


How will you compute size of a structure?

1268


When will we use them?

1102


Why do I need to declare the type of a variable in java?

1154


Explain yield() method in thread class ?

1116


What is an off by one error in java?

998


What is the default access specifier for variables and methods of a class?

1253


What do you understand by casting in java language?

1075