I have a class, PriorityTables, for which I have defined an empty default constructor and a constructor that accepts 2 Strings as arguments as seen below.
public class PriorityTable {
public void PriorityTable(){...}
public void PriorityTable(String letters, String level){
PriorityTable(); //Initialize to zero/null, then change values as needed
....}
}
PriorityTable pTable = new PriorityTable(s, startExp); //s & startExp being String obj
There are no errors in that class, and no errors elsewhere in the project before adding that last statement. Yet, when I try to create a PriorityTable object using the 2 String constructor I get the error stating PriorityTable(String,String) is undefined, but I don't understand why. I thought the error might have something to do with calling the default constructor inside the (String, String) constructor, but the error persisted after commenting out that nested default constructor call. Just really weird to be told it's not defined when I can see the definition. Any thoughts?