When declaring a java file in another java file I get the following error.
The java file which is causing the error has the following code in
public class NumberSettingsFile
{
int maxSortBoxes = 50;
public int getMaxSortBoxes()
{
return maxSortBoxes;
}
}
And I am declaring it using the following code
NumberSettingsFile uniSet = new NumberSettingsFile();
Would someone please be able to explain what I am doing wrong?
The problem was caused by not declaring the package in which the java file was in. The code should have read
package GUIMain;
public class NumberSettingsFile
{
int maxSortBoxes = 50;
public int getMaxSortBoxes()
{
return maxSortBoxes;
}
}