Looking for answers? Westonci.ca is your go-to Q&A platform, offering quick, trustworthy responses from a community of experts. Experience the ease of finding precise answers to your questions from a knowledgeable community of experts. Get quick and reliable solutions to your questions from a community of experienced experts on our platform.
Sagot :
Answer:
C. leagueName=newPlayers.getLeague(); getLeague() is not a member of Players.
Explanation:
The main method in this code will case an error when trying to run the following line of code...
leagueName=newPlayers.getLeague();
This is because the method getLeague() is being called on a Player object which takes all of its methods from the Player class. Since getLeague() is not a method located in the player class then it cannot be called by an object from that class. Especially since the Player class does not extend to the SoccerPlayers class where the getLeague() method is actually located. Instead, it is the SoccerPlayers class which extends the Players class as its parent class.
We hope this information was helpful. Feel free to return anytime for more answers to your questions and concerns. We appreciate your time. Please revisit us for more reliable answers to any questions you may have. Thank you for choosing Westonci.ca as your information source. We look forward to your next visit.