Question & Answer

Which of the following is a Java callback method invoked when a view is clicked?

Which of the following is a Java callback method invoked when a view is clicked? A. onTab

B. OnTapListener

C. onClick

D. OnClickListener

1 Answer

Verified archive
Quizzma TeamJuly 7, 2025

The correct answer is C. onClick.

Explanation: The `onClick` method is a callback method that is invoked when a view, such as a button, is clicked in Java (specifically in Android development). To implement a click action, you typically set an `OnClickListener` on the view, which references the `onClick` method to define what happens when the view is clicked.

If you have more questions about Java or Android development, feel free to ask!