class Three {
  public static void main(String[] args) {
    if (args.length == 0) {
      System.out.println("No data. Bye now.");
    } else {
      double min, max, sum = 0, count = args.length;
      min = max = Double.parseDouble(args[0]);
      for (String s : args) {
        double number = Double.parseDouble(s);
        max = (max < number) ? number : max; // thanks to abbie for catching this!
        min = (min > number) ? number : min;
        sum += number;
      }
      System.out.println("Max: " + max + ", min: " + min + ", average: " + ( sum / count ) + ", range: " + (max - min));
    }
  }
}

--

import java.util.ArrayList; 

class Second {
  public static void main(String[] args) {
    if (args.length == 0) {
      System.out.println("No data. Bye now.");
    } else {
      double min, max, sum = 0, count = args.length;
      min = max = Double.parseDouble(args[0]);
      ArrayList<Double> a = new ArrayList<Double>(); 
      for (String s : args) {
        double number = Double.parseDouble(s);
        a.add(number); 
        max = (max < number) ? number : max; // thanks to abbie for catching this!
        min = (min > number) ? number : min;
        sum += number;
      }
      System.out.println("Max: " + max + ", min: " + min + ", average: " + ( sum / count ) + ", range: " + (max - min));
      java.util.Collections.sort( a );
      System.out.println( a ); 
    }
  }
}