title: Multiple conditions in ternary operators
body: <p>First off, the question is "Write a Java program to find the smallest of three numbers using ternary operators."</p>
  
  <p>Here's my code:</p>
  
  <pre><code>class questionNine
  {
      public static void main(String args[])
      {
          int x = 1, y = 2, z = 3;
          int smallestNum;
  
          smallestNum = (x&lt;y &amp;&amp; x&lt;z) ? x : (y&lt;x &amp;&amp; y&lt;z) ? y : (z&lt;y &amp;&amp; z&lt;x) ? z;
          System.out.println(smallestNum + " is the smallest of the three numbers.");
      }
  }
  </code></pre>
  
  <p>I tried to use multiple conditions in the ternary operator but that doesn't work. I was absent a few days so I'm not really sure what to do and my teacher's phone is off. Any help?</p>