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

What is the synchronized method modifier?

1200


What is the difference between Java1.4 and Java1.5

2305


Is array an object in java?

953


What does sizeof return?

982


define the terminology association.

1098


Why does java have two ways to create child threads? Which way is better?

1040


What is an exception? difference between Checked and Unchecked exception in Java

1012


What is strings in java?

1038


Can I uninstall java?

1043


What do you mean by thread safe?

966


How many ways can an argument be passed to a subroutine and explain them?

1022


What are bind parameters?

1039


How does arraylist work in java?

1110


Is main a function?

1044


Can we change the scope of the overridden method in the subclass?

1387