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
What is use of static in java?
Why do we use predicate in java?
What is byte data type?
What is a function argument in java?
What is unicode with example?
how to create daemon thread in java?
How do you download stubs from Remote place?
Is there any tag in htm to upload and download files?
Does java support function overloading, pointers, structures, unions or linked lists?
why would you use a synchronized block vs. Synchronized method? : Java thread
Does sprintf allocate memory?
Which is faster string or stringbuilder?
Does java have extension methods?
What is composition in java?
What is stringjoiner ?