Question: ****JAVA****** Within a *word.txt* file there are many words listed in it, each word takes one line. In the program, write code to read in

****JAVA****** Within a *word.txt* file there are many words listed in it, each word takes one line. In the program, write code to read in words from the given file, then prompt the user for two words and print out how many words in the file fall between those words. If one of the two words is not contained in the file, then output "word1 or word 2 is not found in the file."

Sample output:

type in the two words: good and night

or night is not found.

Sample output:

type in the two words: hello and computer

are 1234 words between hello and computer

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!