Very basic question regarding user input
Hi there, I'm new to this forum and Java in general. I was just wondering if you can give me a little bit of help with my query on user input. I am pretty much a complete newbie and learning Java from the ground up so please bear with me.
Basically, what I am trying to do is give the user a choice of two options, and depending on what option they choose, the program will do one of two things.
All I have so far is the following:
From there, I want the program to do either one thing or the other (I haven't decided what it will do yet!), depending on what option the user chooses. I understand this is about as basic as you can get
public class options
public static void main (String args)
Scanner scan = new Scanner(System.in);
System.out.print("Please enter 'A' for option A, or 'B' for option 'B': ");
String option = scan.nextLine();
Any help would be greatly appreciated.