Find the output of the following program segment,
when val=500.
Sum = val > 650? 400 : 200;
System.out.println(Sum);
Answers
Answered by
5
a)val=500
Execution:
sum=(500+550)>1750?400:200
sum=1050>1750?400:200;
Output:
200
b)val=1500
Execution:
sum=(1500+550)>1750?400:200
sum=2050>1750?400:200;
Output:
400
#hope it helps.
by nivaskumar
Answered by
41
Answer:
hope it is helpful for you.
Attachments:
Similar questions
Social Sciences,
1 month ago
Computer Science,
1 month ago
English,
2 months ago
English,
9 months ago