Can you have an inner class inside a method and what
variables can you access?
Answers were Sorted based on User's Feedback
Answer / janet
yes, we can have an inner class inside a method and final
variables can be accessed.
Is This Answer Correct ? | 15 Yes | 0 No |
Answer / kabita
yes we have.it is called local inner class.it can access
only final variables of outer class.
Is This Answer Correct ? | 7 Yes | 0 No |
A non-static inner class may have object instances that are associated with instances of the class’s outer class. A static inner class does not have any object instances.
Can we override private method in java?
Can this keyword be used to refer static members?
I have multiple constructors defined in a class. Is it possible to call a constructor from another constructor’s body?
List some oops concepts in java?
Describe the various concepts related to object oriented programming (oop).
How can you share data between two thread in Java?
What is java full form?
what is comparable and comparator interface?
How do you call a reference in java?
What is literal example?
Explain break statement and continue statement?