| preferred AP College board partner for AP classes
easy Solved by 6 students
If Else If Control Flow
< Prev
Next >

What is printed when the following code segment is executed?

public class Test {
    public static void main(String[] args) {
         int value = 10;
         if(value > 10)
             System.out.println("Greater than 10");
         else if(value == 10)
             System.out.println("Equal to 10");
         else
             System.out.println("Less than 10");
    }
}
A

No output

B

Less than 10

C

Greater than 10

D

Equal to 10

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

Question Leaderboard

Rank
User
Correct Count
Attempt Count
Time
Score
#1b.bao.o22 0m 00s 200
#2winstonhou110711 0m 00s 100
#3liuwilliam07241011 0m 34s 66
#4demosolasis111 0m 55s 45
#5asda01 0m 01s -11
Items per page:
10
1 – 5 of 5
No comments yet. Be the first to comment!

AI Tutor

How can I help?

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