Answer:
BBB
Step-by-step explanation:
Given
Java code segment
Required
What is the output?
Analyzing the code segment 1 line after other
This line initializes t to 0
t = 0;
This line checks if t is greater than 7
if(t > 7)
If the above condition is true, the next line is executed
System.out.print("AAA");
NB: Since t is not greater than 7, System.out.print("AAA"); will not be executed
Lastly, this line executed
System.out.print("BBB");
Hence, BBB will be displayed as output