--%>

What is an Anonymous class

Anonymous class: It is a class formed without a class name. Such a class will be a sub class or an implementation of an interface, and is generally formed as an actual argument or returned as a method outcome. For example:

quitButton.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e){
System.exit(0);
}
});

   Related Questions in Programming Languages

  • Q : What is Block Block : The statements

    Block: The statements and declarations are enclosed between a matching pair of curly brackets ({ and }). For example, a class body is a block, as it is a method body. The block surrounds a nested scope level.

  • Q : Use of XMLHttpRequest object in AJAX

    What is the use of XMLHttpRequest object in AJAX?

  • Q : What are tools require View XHTML

    What are tools require View XHTML Documents?

  • Q : Explain the purpose of using XML

    Explain the purpose of using XML.

  • Q : Ways to select HTML Tag Instances

    Explain the different ways in order to select the HTML Tag Instances.

  • Q : Explain Edit-compile-run cycle

    Edit-compile-run cycle: A common portion of the program development procedure. The source file is made initially and compiled. The syntax errors should be corrected in the editor before compiling it again. Once the program has been productively compil

  • Q : Explain Copy constructor Copy

    Copy constructor: It is a constructor which takes a single argument of similar class. For illustration:     public class Point {        

  • Q : What is Stack overflow Stack overflow :

    Stack overflow: Stack overflow takes place whenever too many items are pushed onto a stack with a finite or limited capacity.

  • Q : Introduction to Programming for

    The purpose of this assignment is to get you started with C++ programming. You'll develop simple programs (with input and output) to solve simple mathematical and engineering problems. 1. Write a program to compute the area A of an

  • Q : Program for Linux operating system that

    Write a program for Linux operating system that uses Posix threads to sort a large array.  Specifically, you should write a program to generate random numbers. Then create at least two threads, each of which sorts a portion of the array. After the thr