I need to check if a given string is in between a range of strings.
I have two strings in a file (stringA and stringB), my program would allow me to input a name and test if it fits in the range of stringA and stringB.
For example if the file had Adam & William, and I tested John it would return true, as opposed to Zane which falls outside and would return false.
I hope this make sense, and thank you for any help.
Ryan.
You can use the String class’s
compareTomethod to achieve this functionality, as follows: