// demo for auto-boxing and unboxing features of class java.lang.Number
// and generic methods

class Numbers
{
  public static void main(String[] args)
  {
    Number[] numbers = {1, 2.5, 6, 7.12};     // array of integers and doubles
    printNumbers1(numbers);                   // call of a generic method
    printNumbers2(1.4, 23, 7.56);
  }

  public static <T> void printNumbers1(T[] a) // generic method syntax
  {
    for (T n: a)                              // loop over the array a
      System.out.print(n + " ");
    System.out.println();
  }

  public static <T> void printNumbers2(T... a) // method w. variable # of params
  {
    for (T n: a)                              // loop over the params list
      System.out.print(n + " ");
    System.out.println();
  }


}
