Question: This question involves the reasoning about arrays of Strings. Given an array of String values which contains each word of a phrase as an element,
This question involves the reasoning about arrays of Strings. Given an array of String values
which contains each word of a phrase as an element, it will check to see if a word exists within
the array. The program will also determine if the array contains the same number of words as a
specified phrase by sending a check digit, numWords, to the constructor. You will write two
methods. One method will determine if a specific String value is located within the array and the
other method will determine if the array of Strings has the same number of elements as there
are words in the phrase. For example, if the phrase is Coding in Java rocks:
myWords should contain CodinginJavarocks and myNumWords should equal
The class looks like this:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
