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 difference between static method and instance method in Java?

1188


What is difference between c++ and java ?

1110


Can we declare a class as static?

1080


What are recursive functions?

1037


What is role of void keyword in declaring functions?

1038


What are drawbacks of singleton class?

943


What is hashtable and explain features of hashtable?

970


What is polymorphism java example?

991


Why there is no call by reference in java?

906


What are the limitations of procedural programming approach?

1033


What is the use of toarray () in java?

1051


Can you explain the private protected field modifier?

1013


What is a method type?

983


how is final different from finally and finalize in java?

1041


Can we write any code after throw statement?

1040