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
Reset

Practice a different Java exercise