1)Write a program WordCount that counts the words in one or more files. Start a new
thread for each file. For example, if you call
java WordCount report.txt address.txt Homework.java
then the program might print
address.txt: 1052
Homework.java: 445
report.txt: 2099
2) Implement the merge sort algorithm of Chapter 14 by spawning a new thread
for each smaller MergeSorter. Hint: Use the join method of the Thread class to wait
for the spawned threads to finish. Look up the method’s behavior in the API

    • 13 years ago
    Solution
    NOT RATED

    Purchase the answer to view it

    • p20_4and20_7.zip