Write a program that allows the user to search for a given word ina text file. T
ID: 3610118 • Letter: W
Question
Write a program that allows the user to search for a given word ina text file. The two inputs are the file's name and the targetword. If the target is not found, the program outputs a message tothat effect. Otherwise, the program outputs the number of timesthat this word occurs in the file and the position where it isfirst encountered(counting from position 0). The program shouldignore case when it compares words. Java Programming Use JOptionPane when asking or showing a message. Also ask if you want to play or repeat the program again.Make the text file name great. Have the text file say( Its great that classes can call text files.) Java Programming Use JOptionPane when asking or showing a message. Also ask if you want to play or repeat the program again.
Make the text file name great. Have the text file say( Its great that classes can call text files.)