What is inner class?what is the use of inner class?where we
create the object for inner class? and inner class can
extend any class or inner class can implement any interface?
Answer Posted / gajendar
In Java, just like methods, variables of a class too can have another class as its member. Writing a class within another is allowed in Java. The class written within is called the nested class, and the class that holds the inner class is called the outer class.
we can create object for inner class in methods of outer class.it can extend exactly 1 class or impliment 1 interface
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Can we catch more than one exception in a single catch block?
What is the use of System class?
Can we have return statement in finally clause? What will happen?
What is the purpose of format function?
What is the difference between a switch statement and an if statement?
What is a Presistent Object?
What is parsing in java?
What are the basic concepts of OOPS in java?
What do you mean by platform independence of Java?
Explain differences between collection api and stream api?
Is string serializable in java?
What is a parameter in matrices?
What are checked exceptions?
Is 9 a prime number?
Which is better stringbuffer or stringbuilder?