Interfaces & Callbacks
Home ] Up ] What is Inheritance? ] Inheritance versus Containment ] Superclasses & Subclasses ] Visibility Modifiers & Inheritance ] Final Classes & Methods ] Polymorphism ] Data Hiding & Encapsulation ] Abstract Classes ] Interfaces ] Cloning Objects ] The Collections Framework ] [ Interfaces & Callbacks ]

 

A C++ Callback Example
A Java Callback Example

 

Callbacks are often very useful in C and C++, and Java is no exception to this.  However, the mechanism is different in Java.

In C/C++, it is quite common to call a function, passing an argument of type pointer to a second function, which the first function will call back at the appropriate time.

 

This page was last modified on 02 October, 2007