| preferred AP College board partner for AP classes
easy Solved by 4 students
Basic If-Else Statement
< Prev
Next >

What is printed as a result of executing the following code segment?

public class Main {
    public static void main(String[] args) {
        boolean flag = false;
        if(flag) {
            System.out.println("True");
        } else {
            System.out.println("False");
        }
    }
}
A

Runtime Error

B

True

C

False

D

No output

Hint
Did You Know?
Explain Why
Explain All Answers
Check Answer
Show Correct Answer
Report Question

Question Leaderboard

Not enough data yet to show leaderboard.

No comments yet. Be the first to comment!

AI Tutor

How can I help?

APFIVE © 2020.
Email: [email protected]|Privacy Policy