I am working on this console base application.it is basically a university system on which a student can post different kind of posts and people can reply to there posts.
so, i have this startup class
public class startup {
//not keeping all the student
public static void main(String args[])
{
boolean flag1 = true;
**UniLink link = new UniLink();**
while (flag1 == true)
{
System.out.println("**** UniLink System ****" + "\n" + "1. Login" + "\n" + "2. Quit");
Scanner input_level_1 = new Scanner(System.in);
int responce_level_1=input_level_1.nextInt();
switch (responce_level_1)
{
case 1:{
System.out.println("Enter Username : ");
Scanner input_level_1_1 = new Scanner(System.in);
String response_level_1_1=input_level_1_1.nextLine();
**link.menu(response_level_1_1);**
break;
}
case 2:{
System.exit(0);
}
default:{
System.out.println("Please Try Again");
}
}
}
}
}
I am using a class called Unilink which is doing all the heavy lifting and running the whole program. I did this for better encapluation and cleaner presentation of the code. My menu class allows to perform following tasks.
"1. New Event Post" + "\n" +
"2. New Sale Post" + "\n" +
"3. New Job Post" + "\n" +
"4. Reply to Post" + "\n" +
"5. Display my Post" + "\n" +
"6. Display all Post" + "\n" +
"7. Close Post" + "\n" +
"8. Delete Post" + "\n" +
"9. Log Out" + "\n" +
"Enter Your Choice : ");
but i have been getting this error
Error: Main method not found in class com.company.UniLink, please define the main method as:
public static void main(String[] args)
or a JavaFX application class must extend javafx.application.Application
I appericiate any help