X243: sameStarChar

Returns true if for every '*' (star) in the string, if there are chars both immediately before and after the star, they are the same.

Examples:

sameStarChar("xy*yzz") -> true
sameStarChar("xy*zzz") -> false
sameStarChar("*xa*az") -> true

Your Answer:

Reset

Practice a different Java exercise

Feedback

Your feedback will appear here when you check your answer.