Win a copy of OCP Java SE 8 Programmer II Exam Study Guide this week in the OCP forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Call Back methods  RSS feed

 
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?
 
author
Marshal
Posts: 23438
138
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
 
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).
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!