Is there a good reason why there is no Pair in Java? What would be the equivalent of this C++ construct? I would rather avoid reimplementing my own.<
Pair
It depends on what you want to use it for. The typical reason to do so is to iterate over maps, for which you simply do this (Java 5+):
Map map = ... ; // just an example for (Map.Entry entry : map.entrySet()) { System.out.printf("%s -> %s\n", entry.getKey(), entry.getValue()); }