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

What is the difference between java applets and applications?

0 Answers  


What is a void return type?

6 Answers  


What is a serializable interface?

4 Answers  


Can we use a switch statement with strings?

0 Answers  


Is java developer a good career?

0 Answers  






What is the use of flag?

0 Answers  


Describe the process as to how substring() methodology mechanisms in java.

0 Answers  


Why stringbuilder is not thread safe?

0 Answers  


what is difference between length and length()?

8 Answers  


there are N number of matchboxes numbered 1...N.each matchbox contain various number of stick.Two player can alternatevely pick some amount of stick from the higest stick containing box . The player is condidered win if there is no stick after his move.Find the final move so that the move player win. Note:In case the number of stick is equal ,pick the stick from the higest numbered box.

0 Answers   Manhattan,


what is Assertion?

4 Answers   Wipro,


How many types of constructors are used in java?

0 Answers  


Categories