X37: xyzThere

Write a function in Java that returns true if the given string str contains an occurrence of the substring "xyz" where "xyz" is not directly preceded by a period ("."). For example, "xxyz" counts, while "x.xyz" does not.

Examples:

xyzThere("abcxyz") -> true
xyzThere("abc.xyz") -> false

Your Answer:

Feedback

Your feedback will appear here when you check your answer.