@Sambit - Thanks for the feedback. I removed the variable (updated code below).
That said, it compiled and executed!!! w00t!
I'm not going to have time to revist until tonight, so I MIGHT have a follow-up question or two. You definitely helped me past one, LARGE hurdle.
Thank you!
import java.util.Scanner;
public class Help {
private Scanner input = new Scanner(System.in);
public int showMenu() {
System.out.println("Help on:");
System.out.println(" 1. if");
System.out.println(" 0. Exit Program");
System.out.println("");
System.out.println("enter the option:");
return input.nextInt();
}
public void showIf() {
System.out.println("if:");
System.out.println("if(condition) {");
System.out.println("\tstatement(s);");
System.out.println("}");
System.out.println("The if statement executes one or more statements");
System.out.println("only if the condition evaluates to true");
}
public static void main(String[] args) {
Help needhelp = new Help();
do{
int option = needhelp.showMenu();
switch (option) {
case 0: System.out.println("Bye bye...");
System.exit(0);
break;
case 1: needhelp.showIf();
break;
default:
System.out.println("invalid option");
break;
}
System.out.println(needhelp);
} while (true);
}
}