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

Do I need to import java.lang package any time? Why?

1388


What is the final keyword denotes?

1112


What does it mean that a method or field is “static”?

975


Does java list allow null?

991


Can the garbage collection be forced by any means?

993


What about interthread communication and how it takes place in java?

1060


How do you sort a list in java?

1034


Do I need java for windows 10?

1044


How to create an interface?

1087


What does jre stand for?

1063


What is callablestatement? How you can call stored procedure to pass in parameter?

1025


How hashmap increases its size in java?

990


What happens if main method is not static?

1000


Why we cannot override static method?

1064


How is java created?

946