Check If String Has Repeated Characters Java