Q:

how do I make my if, else code work? I'm stumped

I'm stumped using if else statements. Should I be using something else for this particular code?
I'm trying to get it to break the loop but its stuck in the larger loop...
package Base;
import java.util.Scanner;

public class Game {

    public static void main(String[] args) {

        Scanner input = new Scanner(System.in); 

        System.out.println("Unscrammble the          state capitols:\n");       
        System.out.println("NNLSIGA");

        String Answer = input.nextLine();

        if("Lansing".equals(Answer));
        else {
            System.out.println("Hint: Capitol of the     Great Lake State");
            Answer = input.nextLine();

            if("Lansing".equals(Answer));
            else System.out.println("Try again");

            System.exit(0);
        }

        System.out.println("INNOAPASL");

        Answer = input.nextLine();

        // next question    

A:

Remove the semicolon after if("Lansing".equals(Answer));.Semicolon after if(); makes the if statement completed  means the statements after if is not a part of if like you can say your if condition is like if("Lansing".equals(Answer)){} ie nothing to execute when its true, this is because of the semicolon .Semicolon after if will also give you error(else without if error) for else part.
And also if you are not executing anything in if(true) but you are only excuting in if(false) (you can also say else part of if(true) like your case) you can simply change condition to
if(!("Lansing".equals(Answer))) ie adding a ! operator so if(!true) same as if(false) which would be helpful in your case

