Westonci.ca offers quick and accurate answers to your questions. Join our community and get the insights you need today. Discover in-depth solutions to your questions from a wide range of experts on our user-friendly Q&A platform. Explore comprehensive solutions to your questions from a wide range of professionals on our user-friendly 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 you found this helpful. Feel free to come back anytime for more accurate answers and updated information. Thank you for choosing our platform. We're dedicated to providing the best answers for all your questions. Visit us again. Get the answers you need at Westonci.ca. Stay informed by returning for our latest expert advice.