how do you reload the 'main' method in Java?
Hi all,
I have a java program that is basically a menu. the user chooses an option, which takes them to another class that does various things. The when that class is finished its stuff, I want it to return to the original class with the'main' method in it and reload it, so that the user can choose another option, or choose the option to quit. At the moment, once the second class is finished it just quits, but Ineed it to return to the original class and restart again. ie Code:
public class original { |
Well, you don't "call" a class. You call methods of a class. Your main method could be something like this:
Code:
public static void main( String[] args ) { |
All times are GMT -5. The time now is 06:40 AM. |