here is the error:
Error: Main method not found in class nPack.Try, please define the main method as: public static void main(String[] args) or a JavaFX application class must extend javafx.application.Application
I already have the main method what is wrong?I've been sitting for 2 hours and I can't figure out what's going on. I restarted IDEA but it still doesn't work(
here is my code:
class SearchInfo {
class Search{
public static void main(String[] args) throws IOException {
System.out.println("please sign up: ");
chooseUser();
}
public static String chooseUser()throws IOException {
Scanner sc= new Scanner(System.in);
System.out.println("Choose your specialization: ");
System.out.println("1) Sale manager: ");
System.out.println("2) Client: ");
do{
System.out.print("Your choose: ");
String choose = sc.nextLine();
switch(choose){
case "sale manager":
case "manager":
case "worker":
case "Manager":
case "1":
System.out.println("Welcome company employee: ");
System.out.println("Write your login and password: ");
/*workerInputLgPw();*/
break;
case "Client":
case "client":
case "2":
System.out.println("Welcome our client: ");
System.out.println("Write your login and password: ");
/*clientInputLgPw();*/
break;
default:
System.out.println("Кто ты воин?");
System.out.println("Logout [1] or retry[0]? ");
int ex = sc.nextInt();
if (ex == 0){
chooseUser();
}
else if(ex == 1){
System.exit(0);
}
}
break;
}while(true);
return "";
}
}
}