Answer Posted / preetesh
An Anonymous class is an inner class that is not assigned a
name. It is defined and instantiated within arguments of a
method of the Outer Class.
Syntax is as follows:
----------------------
public class OuterClass
{
//some relevant code
methodName(new ClassName(){ }); /*It indicates compiler
that the code between the braces in the argument of the
method defines an anonymours inner class.*/
}
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
What is the access scope of protected access specifier?
What are constructors in java?
What are the steps involved to write rmi based programs?
design an lru cache in java?
What is hashing principle in java?
what is meant by Garbage collection?
What is an enumeration?
Outline the major features of java.
What steps are taken when the OS shifts from one-thread execution to another?
Why scanner is used in java?
What is data object example?
What technique can be employed to compare two strings?
worst case complexities of Quick sort and Merge sort.
What is immutable in java?
Describe the various concepts related to object oriented programming (oop).