66.9k views
5 votes
Edhesive in JAVA Write a method that takes a String parameter. If the String has a double letter (i.e. contains the same letter twice in a row) then it should return true. Otherwise, it should return false.

This method must be named hasRepeat() and have a String parameter. This method must return a boolean.

User Octi
by
4.3k points

1 Answer

4 votes

I've included my code in the picture below. Best of luck.

Edhesive in JAVA Write a method that takes a String parameter. If the String has a-example-1
User Cristi Pufu
by
4.3k points