Can anyone tell me what I am doing wrong on this code
What's up everyone? This is my first of many posts and I was wondering if anyone could help me out. I know this is probably easy and even funny for some of you to answer for me, but I am trying to get these classes to run as methods in the main. I keep getting an illegal start error when compiling. The classes are all complied and are working individually and are currently in the ba3806 folder. I don't know what I am doing wrong. Can someone please steer me in the right direction. Thanks
package ba3806;
import java.io.*;
import java.util.*;
public class ProMenu
{
public static void main(String[] args) throws IOException
{
System.out.println("Please enter the number that corresponds to the program you wish to use.");
System.out.println("1.......Integer Multiplier");
System.out.println("2.......Index 12 Returner");
System.out.println("3.......Min's, Max's, and Avg's");
System.out.println("4.......Test Averager");
System.out.println("5.......Program Exit");
BufferedReader proreader = new BufferedReader(new InputStreamReader(System.in));
String programnum = proreader.readLine();
if (Integer.valueOf(programnum) == 1)
{
public void exercise1();
}
if (Integer.valueOf(programnum) == 2)
{
public void exercise2();
}
if (Integer.valueOf(programnum) == 3)
{
public void exercise3();
}
if (Integer.valueOf(programnum) == 4)
{
public void exercise4();
}
if (Integer.valueOf(programnum) == 5)System.exit(1);
}
}

