What will be the result of compiling and running the following code?

public class IfElseTest {
    public static void main(String...args) {
        boolean b = false; 
        if (b == false)
            if (b = false)
                System.out.println("if statement");
        else
            System.out.println("else statement");
    }
}

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback
Keep exploring
Java quizzes
Cosmo
Sign Up Now
or Subscribe for future quizzes