Computer Science, asked by maddy623, 8 months ago

Write Java statement for : If x is greater than y, assign the product of x and y to the variable result, otherwise assign the sum of x and y to the same variable result ,using ternary operator.

Answers

Answered by hk1929350
0

Answer:

equal to y x != y // x is not equal to y x > y // x is greater than y x ... The result of fruit1 .equals(fruit2) is the boolean value false . ... !(x < 5 && y == 3) is the same as x >= 5 || y

Similar questions