import java.util.*; public class wordCount {     //fucntion to search the word in the list of strings     public static int search(String word[], String temp_word, int k)     {         //iterate over the array of words         for(int i = 0;i < k;i++)         {             //if the word found, return the index             if(word[i].equals(temp_word))             {                 return i;             }         }         //if the word not fount return -1         return -1;     }     //function to sort two parallel arrays     public static void sort(String word[], int wordCount[], int k)     {         //iterate over the array using nested loops         for(int i = 0;i < k - 1;i++)         {             for(int j = 0;j < k - i - 1;j++)             {                 //if the word at lower index is greater than word at higher index                 //swap the two words                 //swap the two word counts                 if(word[j].compareTo(word[j + 1]) > 0)                 {                     String temp1;                     int temp2;                     temp1 = word[j];                     word[j] = word[j + 1];                     word[j + 1] = temp1;                     temp2 = wordCount[j];                     wordCount[j] = wordCount[j + 1];                     wordCount[j + 1] = temp2;                 }             }         }     }     public static void main(String args[])     {         //create scanner object to read data from user         Scanner sc = new Scanner(System.in);         //prompt the user to enter a sentence         System.out.print("Enter a sentence: ");         String input = sc.nextLine();         int k, n, i;         i = 0;         k = 0;         //create two parallel arrays         String word[] = new String[20];         int wordCo ... See the full answer