• + 0 comments

    public static void main(String[] args) { Object[] arr = {1, 2, 3, "Hello", "World"}; printArray(arr); } static void printArray(T[] array){ for(T element: array){ System.out.println(element); } }