A toy code in Java implementing a method that checks if the character is unique