Question: Java programming Write the static method makeString, which takes an array of words and returns astring containing all the words, each space terminated, using recursion.
Java programming

Write the static method makeString, which takes an array of words and returns astring containing all the words, each space terminated, using recursion. Hint: You will need to use a helper method to do the actual recursion. Two of the points for this problem will be assigned for writinga clear and accurate method comment for your helper method. Such a comment will also help you in writing your code correctly (to aid in thinking recursively). Your method comment does not have to appear at the start of the method as long as you label it and circle it wherever you do write it. Examples (arrays shown below in tostring format, as comma-separated with brackets): words return value of call to makeString (words) note space after the last word) ["the", "big", "dog""the big dog " t1 i.e., empty array) ["the" 1MH "the" note space after the last word) Little or no credit will be given for a solution that does not use recursion. // returns a String made up of the words in words array, each space terminated // if the words array is empty, returns an empty string public static String makeString (String] words)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
