Write a program that will count the number of lines in each file that is specified on the (solution)command line. Assume that the files are text files. Note that multiple files can be specified,as in:java LineCounts file1.txt file2.txt file3.txtWrite each file name, along with the number of lines in that file, to standard output. If anerror occurs while trying to read from one of the files, you should print an error messagefor that file, but you should still process all the remaining files. Do not use TextIO toprocess the files; use a FileReader to access each file.