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?

Answers were Sorted based on User's Feedback



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

Answer / 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

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

Answer / adithya

Static have only one copy in memory. For class we have to
create objects. But for static we cannot create.

Is This Answer Correct ?    7 Yes 9 No

Post New Answer

More Core Java Interview Questions

Can a static class implement an interface?

0 Answers  


why is S capital in System.out.println ????

6 Answers  


What do you mean by static variable?

0 Answers   TCS,


Define "Access specifiers" in java.

0 Answers   HCL,


Can keyword be used as identifier?

0 Answers  


How do you write methodology?

0 Answers  


Find the value of a specified element of the array arr[i] where 0 <= i <= n-1

0 Answers   Amazon,


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

3 Answers   Technological University of the Philippines,


What is serializable interface?

13 Answers   Infosys, Probity Soft, Seed Infotech,


What is super?

0 Answers  


What is command line argument in java?

0 Answers  


What is type inference in java8?

0 Answers  


Categories