• + 0 comments

    In the spirit of the challenge:

        public static <T> void printArray(T[] array) {
            for( T e : array) {
                System.out.println(e);
            }
        }
    
        public static void main(String[] args) {
            Integer[] number = {1,2,3};
            String[] s = {"Hello", "World"};
            
            printArray(number);
            printArray(s);
        }