add java solution for NumberPairs