Write a method called removeInRange that accepts three parameters, an ArrayList of strings, a beginning string, and

Question:

Write a method called removeInRange that accepts three parameters, an ArrayList of strings, a beginning string, and an ending string, and removes from the list any strings that fall alphabetically between the start and end strings. For example, if the method is passed a list containing the elements ["to", "be", "or", "not", "to", "be", "that", "is", "the", "question"], "free" as the start String, and "rich" as the end String, the list’s elements should be changed to ["to", "be", "to", "be", "that", "the"]. The "or", "not", "is", and "question" should be removed because they occur alphabetically between "free" and "rich". You may assume that the start string alphabetically precedes the ending string.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: