Give the output of the following program if the value of the variable a is 15.
1. if (a>20)
{
System.out.print ("Greater");
else
System.out.print ("Not greater");
System.out.print ("Over");
Answers
Answered by
1
Answer:
Output is given as follows
Explanation:
Not greater
Over
Answered by
4
Output is:-
Not greater over.
Steps:-
The value of a is 15,initially.
Now, we have to check whether the condition is true or not.
now, 15>20 is false.
So, true part will not execute.
False part will execute.
It will print Not greater over.
I hope you are satisfied with my answer.
Similar questions