If we find a pair , then print the pair and return . The first condition makes sure that two same values are not added
if ( ( val1 != val2 ) && ( val1 + val2 ) == target ) { System . out . print ( " Pair ▁ Found : ▁ " + val1 + " + ▁ " + val2 + " ▁ = ▁ " + target + "NEW_LINE"); return true ; }