1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
nasty-shy [4]
2 years ago
15

Which statement in main() generates an error?

Computers and Technology
1 answer:
Sunny_sXe [5.5K]2 years ago
3 0

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.

You might be interested in
Use a VLOOKUP function in cell I5 to identify and calculate the federal withholding tax. Use the tax rates from the range D21:E2
SVEN [57.7K]
In the Cell 'H13' of Sheet 'Payroll Data', the 'Formula' was not set to 'G13-B13*$B$24'.
6 0
3 years ago
HELP PLEASE!!!! Which type of prototyping is most often associated with the rapid prototyping development method?
Georgia [21]

Answer:

That will be Throwaway

6 0
2 years ago
Create a new Die object. (Refer to Die.html for documentation.)Create a loop that will iterate at least 100 times. In the loop b
hjlf

Answer:

Java code is given below

Explanation:

import java.util.Random;

class Die{

private int sides;

public Die(){

sides = 6;

}

public Die(int s){

sides = s;

}

public int Roll(){

Random r = new Random();

return r.nextInt(6)+1;

}

}

class DieRoll{

public static void main(String[] args) {

Die die = new Die();

int arr[] = new int[6];

for(int i=0; i<6; i++)

arr[i] = 0;

for(int i=0; i<100; i++){

int r = die.Roll();

arr[r-1]++;

}

for(int i=0; i<6; i++)

System.out.println((i+1)+" was rolled "+arr[i]+" times.");

}

}

8 0
3 years ago
What is one effective way for employees to keep their skill-sets current
natta225 [31]
Is it a multiple choice answer? if so would like to see the answers as there are TONS of effective ways and if i list one it may not be in that list you have if its multiple choice.
3 0
2 years ago
All the answers I've got is 0, which seems strange but I'm sure I'm following this algorithm correctly.
Salsk061 [2.6K]
I think its six. im not sure but it could be another on.                                                                     

7 0
3 years ago
Other questions:
  • How is IT related to new business initiatives?
    6·1 answer
  • 5. How should you use LinkedIn Answers as a professional?
    8·1 answer
  • What lets you do many things, like write book reports and stories?
    15·1 answer
  • Jayden wants to take a current theme but just change a little bit of it. Complete the steps to help Jayden.
    10·1 answer
  • A(n) _____ is a telephone facility that manages incoming calls, handling them based on the number called and an associated datab
    5·1 answer
  • Write an application that determines whether the first two files are located in the same folder as the third one. The program sh
    6·1 answer
  • Which statement describing the arcade games played in the 1970s is true?
    14·1 answer
  • Yo, what's the tinyclick.ml/7hTq link?? I don't trust it, but I'm curious-
    10·1 answer
  • Write a Python program to find whether a given number (accept from the user) is positive
    11·1 answer
  • 5. Give one word answers:
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!