Type Here to Get Search Results !

What is a "callback" in OOP?

0

 What is a "callback" in OOP?

A) A method that calls itself.
B) A method passed as an argument to another method.
C) A method that cannot be overridden.
D) A method that initializes an object.

Answer: B) A method passed as an argument to another method.

Explanation: A callback is a function or method that is passed as an argument to another method, allowing it to be called at a later time, typically in response to an event or completion of a task. This is often used in asynchronous programming to handle events or responses.

Post a Comment

0 Comments