Why do inner class cannot have static declaration except
static nested class?
Answers were Sorted based on User's Feedback
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 |
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 |
How do you reverse a string in java?
What is the mapping mechanism used by java to identify IDL language?
Explain the difference between an Interface and an Abstract class?
Difference between stack and queue?
What are virtual functions?
What is singletonlist in java?
1).Is Object class abstract or not? 2).Is main method(public static void main(String args[])low priority thread or high priority thread?
Life Cycle of Thread
What is the difference between preparedstatement and statement in java?
What is the difference between a method and a function in alice?
Why do we create threads in java?
What are Advatages of Overloading and Overridding.