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 are meta-annotations?
Can you explain the cs option of java interpreter?
What mechanism does java use for memory management?
What is valid keyword in java?
What is widening and narrowing in java? Discuss with an example.
What is native method in java?
Explain the advantages of packages in java?
What is difference between calling start() and run() method of thread?
Can a class be private?
What is a parameter example?
Why are lists ordered in java?
hi am an engineering student and my next plan is for ms in either in us or australia i got my passport but i dont know anything bout visa can u give brief idea 1)How to get prepared for visa and 2)How to apply for top universities and 3)How to pay the fee and so on These all are basic questions plz give me a clear idea
What is pass by value?
why java does not support unsigned keyword?
Can we write class inside a class in java?