Using a Pair/Tuple type in Java
Feb 17, 2024 · 4 min read · At times I find myself wanting to use a type such as tuple in Python (or Scala) or the std::pair from C++ to represent a listing of homogenous or heterogenous values e.g. coordinates (x,y), a value along with its frequency ('b',2) or some other type ...
Join discussion