If a method expects as argument an array of Comparables, you cannot call it with an array of int. For example, the following won't compile: public class Graph{ public static void myPrint(Comparable [] a) { for(int i =0; i < a.length; i++) System.out.println(a[i]); } public static void main(String argv []) { int [] b1 = new int[2]; b1[0] = 10; b1[1] = 11; myPrint(b1); } } Instead, you'll have to do this: public class Graph{ public static void myPrint(Comparable [] a) { for(int i =0; i < a.length; i++) System.out.println(a[i]); } public static void main(String argv []) { int [] b1 = new int[2]; b1[0] = 10; b1[1] = 11; Integer [] b = new Integer[2]; b[0] = b1[0]; b[1] = b1[1]; myPrint(b); } }