public class object{
public static void method1() {
System.out.println("Go to Another method? [y] yes [n] no");
choice = scan.next();
// If I choose "y" it keeps going to ifChoiceNo method
// how prevent this from happening
if (choice.equalsIgnoreCase("y")) {
object.ifChoiceYes();
}
if (choice.equalsIgnoreCse("n")) {
object.ifChoiceNo();
}
}
public static void ifChoiceYes() {
System.out.println("Your Choice is Yes");
}
public static void ifChoiceNo() {
System.out.println("Your Choice is No");
}