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);

}

}

[1632 byte] By [javarookie21a] at [2007-11-26 22:22:27]
# 1

if (Integer.valueOf(programnum) == 1)

{

public void exercise1(); // This is not a valid statement.

}

Is exercise1() a method from one of your classes?

In that case, if it's static call it using <ClassName>.exercise1(); (just like you call Integer.valueOf) and if it is not, get an instance of your class and call the method on that instance (like proreader.readLine).

TimTheEnchantora at 2007-7-10 11:20:58 > top of Java-index,Java Essentials,New To Java...
# 2
exercise1 is a seperate class file that is found in the same directory as the ProMenu.class file. I am wanting to run the main of exercise1 from the ProMenu class. Can this be done or am I missing the big picture here. Thanks for your time on this.
javarookie21a at 2007-7-10 11:20:58 > top of Java-index,Java Essentials,New To Java...