PLEASE HELP I need to submit my assignment tonight. I amgetting 1 or an error for the output of words for the document Iinput. I need help with counting the words correctly. THANKYOU
- Write a program that asks the user for the name of a file. Theprogram should display the number of words that the filecontains.
The file to test your program on is attached to the assignmentfolder. It is called Lorem.txt.
Here is my file
import java.util.Scanner;
import java.io.*;
public class WordCounter {
public static void main(String[] args) throwsIOException{
// TODO Auto-generated methodstub
int wordCount = 0;
String fileName;
OR
OR