I have been learning about Java for the past month or so, and have been using Arnow, Dexter and Weiss's Introduction to Programming Using Java. In Chapter 6, there's this Exercise 21, which basically states:
"Write a method mySubStr() that receives two Strings and returns a boolean value: true only if one of the Strings is a substring of the other. Do not use any methods of the String class other than length()."
Is this even possible? I mean, if you can't even use substring or indexOf or any others, how can you compare two Strings to see if one is a substring of the other?
Thanks in advance for any help, as this question has really been bothering me. I'm just not sure if I don't know how to do it or there is a typo in the book.