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

What is the major difference between linkedlist and arraylist?

976


What is a for loop in java?

998


How do you sort in ascending order in java?

824


How many types of classes are there in java?

1006


What is the size of int?

1043


How many arguments can a method have java?

980


Can we override private constructor in java?

917


Can inner class extend any class?

1012


What are the advantages of exception handling?

1016


How do you create a reference in java?

922


What is replaceall in java?

980


What are predefined functions?

1072


What is static synchronization?

1042


What is the reason behind using constructors and destructors?

1010


Why to use nested classes in java? (Or) what is the purpose of nested class in java?

1025