CS112: In-class Exercise 23Extracting words from a sentenceand characters from a word0. Review of the splitmethod.•The splitmethod when applied to a string...someString.split(pattern)will return a Stringobject (a true array of String). Here someStringis either a String variable or String literal or any String expression.•Here the string patternis a string that gives the pattern of how to break up the string. One type of pattern is to use square brackets to enclose characters that separate words. For example, if we only want spaces to separate words, then can do…someString.split("[ ]")•The result must be saved into a Stringvariable. For example,String wordArray;wordArray =someString.split("[ ]");1.Copy the InClass23 folder from the usual locations.2.Open the project using BlueJ.3.Note that the Algorithmsclass is functional (although you do not have the source file). That is, you can use the linearSearchand binarySearchmethods from this class.
This is the end of the preview.
access the rest of the document.