Question: Write a method called containsPair which takes three integers as parameters and returns true if any two of them are the same. If all three
Write a method called "containsPair" which takes three integers as parameters and returns true if any two of them are the same. If all three numbers are different, the method should return false.
The table below shows sample calls and the value that should be returned.
Method Call
Value Returned
containsPair
false
containsPair
true
containPair
true
containsPair
false
containsPair
true
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
