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?



What is inner class?what is the use of inner class?where we create the object for inner class? and ..

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

More Core Java Interview Questions

Which non-unicode letter characters may be used as the first character of an identifier?

0 Answers  


What is used of static keyword in java?

0 Answers   Cyient,


Explain different states of a thread in java?

0 Answers  


what Data encapsulation in java?

5 Answers  


What is type safety in java?

0 Answers  






GoldMansachs Interview process....

1 Answers   Goldman Sachs,


What is the largest long allowed by java?

0 Answers  


These static constructors are correct ? class A { statc intA() { } static A(int x,int y) { } static A(int x) { } }

0 Answers   HCL,


Default layout of panel and frame?

3 Answers  


Why char array is favored over string for the storage of passwords?

0 Answers  


When a byte datatype is used?

0 Answers  


What is hashtable and explain features of hashtable?

0 Answers  


Categories