Question: Given the following partial Java code, which of the options can be used to invoke the playFootball or playBaseball method inside the M Y method?
Given the following partial Java code, which of the options can be used to invoke the playFootball or playBaseball method inside the method?
interface LoveSports
void playFootball;
void playBaseball;
interface LoveSports
class Student implements LoveSports
void playFootball
some code here
void playBaseballo
some code here
void
some code to call playfootball or playBaseball
class Student
protected eg protected.playFootball
invoke eg invoke.playFootball
inherit eg inherit.playFootball
public eg public.playFootball
this eg this.playFootball
None of the other options.
super eg super.playFootball
static eg static.playFootball
private eg private.playFootball
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
