In Java, the equivalent of the C++ Pair class is the AbstractMap.SimpleEntry class or the AbstractMap.SimpleImmutableEntry class.