X1526: endsLy modified

Write a function in Java that implements the following logic: Given a string, return true if it ends in "ly".

Note that you are NOT allowed to use any of startsWith(), endsWith() nor contains().

You may consult the String documentation for other methods to use.

Your Answer:

Reset

Practice a different Java exercise

Feedback

Your feedback will appear here when you check your answer.