Question: Java can somebody please fix the problem. thank you 5 star rating. 2 import java.io.Buffered Reader; 3 import java.io.PileReader; 4 import java.io.IOException; 5 import java.util.ArrayList;

 Java can somebody please fix the problem. thank you 5 star
rating. 2 import java.io.Buffered Reader; 3 import java.io.PileReader; 4 import java.io.IOException; 5
import java.util.ArrayList; 6 import java.util.Comparator; 7 import java.util.Iterator; 8 import java.util.Scanner; 9
Java
can somebody please fix the problem. thank you 5 star rating.

2 import java.io.Buffered Reader; 3 import java.io.PileReader; 4 import java.io.IOException; 5 import java.util.ArrayList; 6 import java.util.Comparator; 7 import java.util.Iterator; 8 import java.util.Scanner; 9 10 public class Longest Words { 11 public static void main(String[] args) throws IOException { 12 Scanner scanner = new Scanner(System.in); 13 System.out.println("Enter at most 9 character word: "); 14 String input = scanner.next(); 15 input = input.length() > 9? input.substring(0, 9) : input; 16 17 ArrayList matchlist = new ArrayList(); 18 19 String word; 20 do { I 21 word - bufferedReader.readLine().strip(); 22 while (word. length() > 9); 23 24 while (word - null) { 25 boolean was found = true; 26 StringBuffer temp = new StringBuffer (input); 27 for (int i = 0; i 33 34 It wasfound) 35 matchList.add(word); 36 27 if (wasFound) { matchList.add(word); } do { word = bufferedReader.readLine(); word = word -- null ? null : word.strip(); } while (word 1null && word. length() > 9); ) matchList.sort(new Comparator() { @Override public int compare(String ol, String return ol.compareTo(02); 0212 } }); System.out.println("The largest word are:" ); for (String string : matchlist) { if (string.length() == matchlist.get(matchlist.size() - 1).length() { System.out.println(string); ccc_v1_w_DUSpo_52756@runwebio:-$ [ Executing 'RUN'...] ccc_v1_w_DU5po 52756@runweb10:-$ ccc_vi_w_DUSpo_52756@runweb10:-$ cd; VOC_SELECTED_FILE="LongestWords.java" /bin/b LongestWords.java:21: error: cannot find symbol word - bufferedReader.readLine().strip; symbol: variable bufferedReader location: class Longest Words LongestWords.java:39: error: cannot find symbol word - bufferedReader.readline symbol: variable bufferedReader location: class Longest Words 2 errors Compilation failed

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!