I have my main.java then I imported the class import Options.newGame; now I just need to put the reference in my if statement. Sorry it's been a while since I did this kind of thing. I found a post from a while ago on another forum I use to use and I can't tell what's going on. Forgot so much
import java.util.Scanner; import Options.exitGame; import Options.loadGame; import Options.newGame; public class main { public static void main(String[] args){ Scanner choice = new Scanner(System.in); String input; System.out.println("\t\t\tWelcome to Fantasy World."); System.out.println("Select what you would like to do."); System.out.println("1) New Game"); System.out.println("2) Load Game"); System.out.println("3) Exit Game"); input = choice.nextLine(); if(choice == 1){ newGame.newGame(); } } }
The code is incomplete.
Sorry, I couldn't find the edit button (if there is one). I feel like I have to make an object for the class like my other example shows. If you wish for it to be provided I can get it.