(5 points) Weiss exercise 2.12. You do not have to do this on your computer, but you are
welcome to do so if you wish, and paste the code into your document (or just print it if you did the rest of the problems by hand).
You should not use high-level tools like StringTokenizer to do
this, but should use the basic String operations (indexOf and
substring may be particularly helpful). The following code and
output may help clarify what the method is supposed to do.
public
static void
main(String[] args) {
String[] stringList = split("Here
is a short sentence.", " ");
for (String s :
stringList)
System.out.println(s);
System.out.println("-------");
stringList = split("abracadabra.",
"bc");
for
(String s : stringList)
System.out.println(s);
}