title: 3 numbers in ascending order WITHOUT the use of conditional statements in Java. As in I can't use if statements at all
body: <p>My code looks like this so far:</p>
  
  <pre><code>public class ThreeSort {
      public static void main(String[] args) {
  
          int num1 = Integer.parseInt(args[0]);
          int num2 = Integer.parseInt(args[1]);
          int num3 = Integer.parseInt(args[2]);
  
  
          int x = Math.min(num1, num2);
          int min = Math.min(x,num3);
          int z = Math.max(num1, num2);
          int max = Math.max(z, num3);
  
          int a = 0;
          int mid = 0;
  
  
  
          while (mid &gt;= min &amp;&amp; mid &lt;= max) {
  
          mid = a;
  
          }
  
          System.out.println(min);
          System.out.println(a);
          System.out.println(max);
  
  
  
      }
  </code></pre>
  
  <p>I know how to do the min and the max but I'm having troubles with the middle one. Any idea how to do that without conditional statements?</p>