Tuple Java practice