Here's the code where I'm receiving the error (at the second "Killer" after "new").
String[] classes = new String[5];
kills[0] = "Brian Moser";
kills[1] = "James Doakes";
kills[2] = "Lila Tourney";
kills[3] = "Miguel Prado";
Killer morgan = new Killer("Dexter",
"Morgan",
kills,
4.0,
"Arthur Mitchell",
3,
false);
This has been giving me quite a bit of trouble, as I see no reason why this declaration should work based on my constructor for Killer.
And here's the Killer class:
import java.util.*;
public abstract class Killer{
public String firstName;
public String lastName;
private String[] killList;
private double score;
private String nemesis;
private int accidents;
public boolean caught;
public Killer(String firstName,
String lastName,
String[] killList,
double score,
String nemesis,
int accidents,
boolean caught)
{
this.firstName = firstName;
this.lastName = lastName;
for(int i = 0; i < 5; i++)
this.killList[i] = killList[i];
this.score = score;
this.nemesis = nemesis;
this.accidents = accidents;
this.caught = caught;
} //end constructor
I know this probably has a simple solution, but as of now, I'm not seeing it.