Hi everyone:
I need help Please I'm still learning Java...
Here is part of my code where I'm having problems.
Problem is at public static void main(String[] args) {
The method main cannot be declared static; static methods can only be declared in a static or top level type..
thanks
nomad
I need help Please I'm still learning Java...
Here is part of my code where I'm having problems.
Problem is at public static void main(String[] args) {
The method main cannot be declared static; static methods can only be declared in a static or top level type..
Code:
Code:
public static void main(String[] args) {
Employee emp = new Employee();
Scanner kbd = new Scanner(System.in);
int choice;
System.out.println("Make a Section: ");
System.out.println("1. Enter ");
System.out.println("2. Find ");
System.out.println("3. Exit ");
System.out.print("\nPlease press Enter afer each response");
System.out.println("Enter your chose please: ");
choice = kbd.nextInt();
kbd.nextLine();
if (choice == 1) { // if 1 is select go to makePerson
emp.inputEmployee();
} // close the if loop
if (choice == 2) { // if 2 is select go to find
emp.displayMatch();
}// close the choice==2
if (choice == 3) {
System.out.printf("Good bye");
}// close the choice == 3
}// close public static void
nomad
Comment