Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
336 B
3
Indexable
Never
	public static String <T> arrayPrint(T[] a){
		 String temp = "";
		 for(int i=0; i<a.length; i++) {
			 temp += a[i].toString();
		 }
		 return temp;
	}
	public static void main(String[] args) {
		Integer[] a = {3,4};
		String[] b = {"ILove", "Java"};
		System.out.print(arrayPrint(a));
		System.out.print(arrayPrint(b));