Callback Methods.. ?

Hi.. Can any one explain what are these callback methods... ?
[75 byte] By [Shebua] at [2007-11-27 9:51:52]
# 1

these callback methods; what exactly are you referring to?

In C it is sometimes needed to pass a function pointer to, say, a library, so later the library can "call" that function "back".

In Java we use interfaces for that purpose. We pass an object and later a method of that object can be called back.

Also a method of a listener, like ActionListener's actionPerformed is a callback method.

tom_jansena at 2007-7-13 0:21:04 > top of Java-index,Java Essentials,Java Programming...
# 2

> these callback methods; what exactly are you

> referring to?

>

> In C it is sometimes needed to pass a function

> pointer to, say, a library, so later the library can

> "call" that function "back".

>

> In Java we use interfaces for that purpose. We pass

> an object and later a method of that object can be

> called back.

> Also a method of a listener, like ActionListener's

> actionPerformed is a callback method.

Doesn't have to be an interface

georgemca at 2007-7-13 0:21:04 > top of Java-index,Java Essentials,Java Programming...
# 3
hi... thanks for reply..but...can I have some more explanation that Y are they called "Callback methods" ... need of their particular use... ?
Shebua at 2007-7-13 0:21:04 > top of Java-index,Java Essentials,Java Programming...
# 4

> hi... thanks for reply..

> but...

> can I have some more explanation that Y are they

> called "Callback methods" ... need of their

> particular use... ?

This is not exclusive to java but is a general concept used throughout computer science. For a good general review of the concept, have a look here:

http://en.wikipedia.org/wiki/Callback_%28computer_science%29

petes1234a at 2007-7-13 0:21:04 > top of Java-index,Java Essentials,Java Programming...
# 5
http://mindprod.com/jgloss/callback.html
_helloWorld_a at 2007-7-13 0:21:04 > top of Java-index,Java Essentials,Java Programming...