subject

Which statement in main() generates an error? public class Players {
public void setName(String newName) { … }
public void setAge(int newAge) { … }
};
public class SoccerPlayers extends Players {
public void setDetails(String newName) { … }
public String getLeague() { … }
};
public static void main(String args[]) {
String leagueName;
Players newPlayers = new Players();
SoccerPlayers playerObject = new SoccerPlayers();
playerObject. setName("Jessica Smith");
playerObject. setAge(21);
leagueName = newPlayers. getLeague(); }
A. SoccerPlayers playerObject=new SoccerPlayers(); An object of a derived class cannot be created.
B. playerObject. setName("Jessica Smith"); setName() is not declared in SoccerPlayers.
C. leagueName=newPlayers. getLeague(); getLeague() is not a member of Players.
D. Players newPlayers=new Players(); An object of a base class cannot be created.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 02:00
Alocal reaction will occur at the site of the exposure such as irritation or damage to the skin eye or local reaction will occur at the site of the exposure such as irritation or damage to the skin ireland lounges
Answers: 3
question
Computers and Technology, 23.06.2019 01:00
Write the command that can be used to answer the following questions. (hint: try each out on the system to check your results.) a. find all files on the system that have the word test" as part of their filename. b. search the path variable for the pathname to the awk command. c. find all files in the /usr directory and subdirectories that are larger than 50 kilobytes in size. d. find all files in the /usr directory and subdirectories that are less than 70 kilobytes in size. e. find all files in the / directory and subdirectories that are symbolic links. f. find all files in the /var directory and subdirectories that were accessed less than 60 minutes ago. g. find all files in the /var directory and subdirectories that were accessed less than six days ago. h. find all files in the /home directory and subdirectories that are empty. i. find all files in the /etc directory and subdirectories that are owned by the group bin."
Answers: 1
question
Computers and Technology, 23.06.2019 08:00
Which argument is not a valid filter? does not equal this quarter filter by cell color all of these are valid filter arguments.
Answers: 2
question
Computers and Technology, 23.06.2019 22:20
Read “suburban homes construction project” at the end of chapters 8 and 9 (in the textbook) and then develop a wbs (work breakdown structure) in microsoft excel or in microsoft word (using tables)
Answers: 1
You know the right answer?
Which statement in main() generates an error? public class Players {
public void setName(Str...
Questions
question
Mathematics, 21.01.2022 04:50
question
Spanish, 21.01.2022 04:50
Questions on the website: 13722367