Question: Complete the method named verifyNoDuplicates ( ) to do the following: The method takes a String parameter named str . The method returns a boolean
Complete the method named verifyNoDuplicates to do the following:
The method takes a String parameter named str
The method returns a boolean value.
The method returns true if the parameter String does not contain any duplicate characters, otherwise it returns false.
The method distinguishes between upper case and lower case letters, for example, if a String contains a and A those two characters are not the same, therefore they are not duplicates.
The space character is not considered a duplicate.
Sample runs provided below.
tableMethod Call,Return ValueverifyNoDuplicatesAmazon;trueverifyNoDuplicatesamazon;falseverifyNoDuplicatesN E I U;trueverifyNoDuplicatesCountertop;falseverifyNoDuplicatesBody builder";false
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
