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...

Why do inner class cannot have static declaration except
static nested class?

Answer Posted / vipul

Inner classes share a intimate relationship wth the outer
class which means to instantiate the inner class we need to
obtain the object of the outer class.in any case the inner
class contain any static member then we can access it only
with inner class name in that case we won't require its
object whch means we won't require the outer class
object.but java doesn't allow this if we want to access ny
if the inner class data member we must ahve outer class n
inner class object....queries r most welcomed..

Is This Answer Correct ?    6 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can subclass overriding method declare an exception if parent class method doesn't throw an exception?

1002


What Is Composition?

1003


What are the types of collections in java?

1003


How to invoke external process in java.

1024


Is java call by value?

1027


How many types of assembly languages are there?

923


Can we rethrow the same exception from catch handler?

1081


Explain hashset and its features?

1085


Write an algorithm for quick sort?

969


What is the difference between Java Program Constructor and Java Program Method, What is the purpose of Java Program constructor Please Explain it Breafily?

991


Can we define private and protected modifiers for variables in interfaces?

1023


Explain the transient field modifier?

965


Why map is used in java?

984


How to split arraylist elements in java?

1101


Can we declare an array without size in java?

926