public class GenericClassExample2<E, E2> {
    
    
    private E[] values;
    private E2[] values2;
    
    public GenericClassExample2(E[] values, E2[] values2) {
        this.values = values;
        this.values2 = values2;        
    }
    
    
    public void print() {
        if (values.length >= values2.length) {
            print(values, values2);
        }else{
            print(values2, values);
        }
    }
    
    private <T, T2> void print(T[] longArray, T2[] shortArray) {
        for (int i = 0; i < longArray.length; i++) {
            System.out.println(longArray[i] + " - " + (i < shortArray.length ? shortArray[i] : "No matching value"));
        }
    }
    
    
}