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.
\table[[Method Call,Return Value],[verifyNoDuplicates("Amazon");,true],[verifyNoDuplicates("amazon");,false],[verifyNoDuplicates("N E I U");,true],[verifyNoDuplicates("Countertop");,false],[verifyNoDuplicates("Body builder");,false]]
Complete the method named verifyNoDuplicates ( )

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!