3) Write a Java method (header given below) that does this:
1) open the file named fileName, read each line of the file
2) build a list of words from the file that start with thecharacter ‘f’
and have < 5 letters
3) return the list built in Step 2; make sure the length of thelist is exactly the number of elements found in Step 2
For example, if the input file contains
fee
kill
facts
foxx
filament
your method will return an array of Strings with 2 elements,”fee”
and “foxx”. 20 points
String [] getWords(String fileName) throws Exception {
Expert Answer
An answer will be send to you shortly. . .
PayPal Gateway not configured
PayPal Gateway not configured