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 are the two types of streams offered by java 8?
Does java support function overloading, pointers, structures, unions or linked lists?
Is empty in java?
What is the difference between integer parseint and integer valueof?
What is meant by overloading?
What is the platform?
What is threaded programming and when is it used? : Java thread
Is string is a class in java?
What do you mean by platform independence? What is an interface?
What is an i/o filter?
Why are data types important?
What is the difference between dom and sax parser in java?
What is an off by one error in java?
What does the exclamation mark mean in java?
when a request is generated from apache tomcat 5.5 and goes to oracle 10g or mysql,,, how the oracle or mysql reads the request as apache is a web server and oracle 10g is application server? when the oracle 10g provides response, how the apche tomcat reads it???