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
How to find the given number is a prime number or not by getting input from the user
What are annotations in java?
Explain about data types?
Why is java logo a cup of coffee?
Is a method a procedure?
Is an array a vector?
Write an algorithm program in java for the following question.. 1) S is a set of integers.X is an integer obtained by sum of two digits in S. Write logic for whether or not the X is from the S. The time of algorithm should not exceed o(n logn).
In a class implementing an interface, can we change the value of any variable defined in the interface?
What is the default size of load factor in hashing based collection?
What is size () in java?
What is an i/o filter?
Does string isempty check for null?
What is the default value of an object reference declared as an instance variable?
What is functional interface in javatpoint?
What is bubble sort in java?