class TernaryOperatorEquivalentToIfElse
{
   public static void main(String[] args)
   {
      int a, b, result; // declare three of same type using comma-delimited list
      a = b = result = 13; // initialize all to 13
      
      if(a + 1 > b) 
      {
          result = a + 1;
      }
      else 
      {
          result = b;
      }
      System.out.println(result);
      
      // similar logic with ternary operator
      result = a > b ? a + 1 : b;
      System.out.println(result); 
   }
}
  
