Worked example
class Pair<K, V> {
private K key;
private V value;
public K getKey() { return key; }
public V getValue() { return value; }
}
Pair<String, Integer> p = new Pair<String, Integer>("age", 30);
System.out.println(p.getKey()); // age
System.out.println(p.getValue()); // 30
Two independent placeholders, two different actual types.