Could someone please help me out. I have an illegal start of an expression error at line 8 in the following code.
package untitled5;
public class Untitled1 {
public static void main(String[] args) {
public static void main(String[] args) {
int start_system, add_modify, add_modify_animal_data, report,
exit_system;
int check = menu();
while (check != 4) {
if (check == 1) {
add_modify_data();
}
else
if (check == 2) {
add_modify_medical_data();
}
else
if (check == 3) {
report();
}
check = menu();
}
exit_system();
System.exit(0);
}
{
public static void start_system() {
System.out.println("Start_system now");
}
}
//sets up the output
public static int menu() {
int check;
String output = "Modify Animal Data" + "\n " +
"1. Add/Modify Animal Data " + "\n" +
"2. Add/modify Meical Data " + "\n" +
"3. Report Section " + "\n" +
"4. Exit " + "\n " + "\n " + " Enter Your Selection:";
String scheck = JOptionPane.showInputDialog(null, output, " ",
JOptionPane.QUESTION_MESSAGE);
check = Integer.parseInt(scheck);
return check;
}
public static void add_modify() {
int check1;
while (check1 != 4) {
if (check1 == 1) {
add_animal_data();
}
else
if (check1 == 2) {
delete_animal_data();
}
else
if (check1 == 3) {
change_animal_data();
}
check1 = menu();
}
exit_system();
System.exit(0);
String output = "Modify Animal Data " + "\n " +
"1. Add Animal Data " + "\n" +
"2. Modify Animal Data " + "\n" +
"3. Change Animal Data " + "\n" +
"4. Exit " + "\n " + "\n " + " Enter Your Selection:";
String scheck = JOptionPane.showInputDialog(null, output, " ",
JOptionPane.QUESTION_MESSAGE);
check1 = Integer.parseInt(scheck);
}
public static void add_modify_medical_data() {
int check2;
while (check2 != 4) {
if (check2 == 1) {
add_medical();
}
else
if (check2 == 2) {
delete_medical();
}
else
if (check2 == 3) {
change_medical();
}
check2 = menu();
}
exit_system();
System.exit(0);
String output = "Modify Medical Data " + "\n " +
"1. Add Medical Data " + "\n" +
"2. Modify Medical Data " + "\n" +
"3. Change Change Data " + "\n" +
"4. Exit " + "\n " + "\n " + " Enter Your Selection:";
String scheck = JOptionPane.showInputDialog(null, output, " ",
JOptionPane.QUESTION_MESSAGE);
check2 = Integer.parseInt(scheck);
}
public static void report() {
System.out.println("in Report");
}
public static void exit_system() {
System.out.println("in exit system");
};
}
}
Thank you