Write a program named Lab18D with: A recursive method that accepts an array of strings. It should return a count of strings in the array that start with an 's' and print them as well (on one line with a space between them). A second recursive void method that receives an array of strings and prints the array (on one line with spaces between the values.) Don't use the Arrays.toString method to shortcut this; each recursive call of the method should only print one string. The main method should read an unknown number of strings from the input file (Lab18D.txt) into an array. (Each string is a single word.) Call the method to print the array and then the method to look for strings starting with an 's'. Print a label before calling this method.

icon
Related questions
Question
Write a program named Lab18D with:
• A recursive method that accepts an array of strings. It should return a count of
strings in the array that start with an 's' and print them as well (on one line
with a space between them).
A second recursive void method that receives an array of strings and prints
the array (on one line with spaces between the values.) Don't use the
Arrays.toString method to shortcut this; each recursive call of the method
should only print one string.
The main method should read an unknown number of strings from the input
file (Lab18D.txt) into an array. (Each string is a single word.)
Call the method to print the array and then the method to look for strings
starting with an 's'. Print a label before calling this method.
Transcribed Image Text:Write a program named Lab18D with: • A recursive method that accepts an array of strings. It should return a count of strings in the array that start with an 's' and print them as well (on one line with a space between them). A second recursive void method that receives an array of strings and prints the array (on one line with spaces between the values.) Don't use the Arrays.toString method to shortcut this; each recursive call of the method should only print one string. The main method should read an unknown number of strings from the input file (Lab18D.txt) into an array. (Each string is a single word.) Call the method to print the array and then the method to look for strings starting with an 's'. Print a label before calling this method.
hello
hi
fruitcake
sunshine
yellow
purple
red
green
blue
butterfly
bird
Transcribed Image Text:hello hi fruitcake sunshine yellow purple red green blue butterfly bird
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 2 images

Blurred answer