Android
OA0-002 · Question #104
Which of these is the correct code which enables a BroadcastReceiver callback?
The correct answer is C. public class ReceiverSample extends BroadcastReceiver{ public void onReceive(Context context. See the full explanation below for the reasoning.
Question
Which of these is the correct code which enables a BroadcastReceiver callback?
Options
- Apublic class ReceiverSample extends BroadcastReceiver { public void onCreate(Context context,
- Bpublic class ReceiverSample implements BroadcastReceiver{ public void onCreate(Context
- Cpublic class ReceiverSample extends BroadcastReceiver{ public void onReceive(Context context,
- Dpublic class ReceiverSample implements BroadcastReceiver { public void onReceive(Context
How the community answered
(58 responses)- A5% (3)
- B9% (5)
- C71% (41)
- D16% (9)
Community Discussion
No community discussion yet for this question.