Answer Posted / harika.thota001@gmail.com
Inner Class in java so called nested class is nothing but a class that is being defined inside another class. Inner classes are beneficial in two scenarios i.e. access control and naming control. Although these benefits can be acquired using java packages.
anonymous class is an inner class that does not have a name at all. And whose instance is being created at the time of its creation.
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
How do you define a singleton class?
Can you run java program without main method?
What is the use of bufferedreader?
Can we create an object of private class?
What is style and indentation?
What is a short in java?
Objects or references which of them gets garbage collected?
What is boolean flag in java?
What are white spaces in java?
How do you declare an empty string?
How the interruptible method gets implemented?
What is data and its types?
how do I create a runnable with inheritance? : Java thread
How do you start a new line in java?
Define how can we find the actual size of an object on the heap?