I can't seem to instantiate an object from a class that I've written into the main method. I don't know if its a problem with my code or netBeans. Here's is the program with comments solely for the question:
package app;
import java.util.Scanner;
public class SetUpSite {
public static void main(String[] args) {
final int FOUNDED_YEAR = 1977;
int currentYear;
int age;
statementOfPhilosophy();
Scanner reader = new Scanner(System.in);
//the very next line is the only line unrecognized
EventSite oneSite = new EventSite();
int siteNum;
System.out.print("Enter the event site number: ");
siteNum = reader.nextInt();
oneSite.setSiteNumber(siteNum);
System.out.print("Enter the Current year of the company: ");
currentYear = reader.nextInt();
System.out.println("The age of the Company is "+ calculateAge(FOUNDED_YEAR, currentYear) + " years");
}
public static void statementOfPhilosophy() {
System.out.println("Event Handlers INC");
}
public static int calculateAge(final int ORIGINAL_YEAR, int currentDate) {
int years = currentDate - ORIGINAL_YEAR;
return years;
}
public class EventSite {
private int siteNumber;
public void oneSite() {
}
public int getSiteNumber() {
return siteNumber;
}
public void setSiteNumber(int n) {
siteNumber = n;
}
}
}