write a program in java to input two numbers and find the maximum and minimum using ternary operator.
Answers
Answered by
12
Explanation:
please refer to the above picture
Attachments:
Answered by
0
Answer:
class maximum {
public static void main (string s) {
in a = 6
int b =8
int max = (a > b)?
a:b
int min = (a<b)?
a:b
system.out. println(max);
system.out. println(min);
}
}
Similar questions