• Post Reply Bookmark Topic Watch Topic
  • New Topic

Call Back methods  RSS feed

 
Ramesh Etta
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What are call back methods in java? Can anyone give examples of those?
 
Henry Wong
author
Sheriff
Posts: 23295
125
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ramesh Etta:
What are call back methods in java? Can anyone give examples of those?


A "Callback" is a programming technique. And it is not specific to Java. It can be implemented in practically any modern language -- and Java is no exception.

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

Henry
 
Petrus Pelser
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is usually used in event listeners and asynchronous method calls. You basically have an object register with another object to tell it to do something and let the first object know when it is done by calling a method on the first object (usually implemented from an interface).
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!