Ternary Operator

Write a program in java to demonstrate ternary operator?

class TernaryOperator {                 public static void main(String arg[])                 {                                 int a=9,b=7;                                 int max=(a>b)?a:b;                                 System.out.println(max);                …

Read More