Question: explain each line of code and at the end explain how the program functions import java.io. import java.util.*; public class TextReader public static void main(String
explain each line of code and at the end explain how the program functions

import java.io. import java.util.*; public class TextReader public static void main(String args[]) String file; Scanner in new Scanner (System.in) String words[]new String [100]; System.out.print ("Please enter the filename: "); file- in.next ) Scanner fin - new Scanner (new File (file)); PrintWriter outnew Printwriter(new File ("output.txt")); int i-0, j-0; while(fin.hasNextLine ()) words [i] - fin.next(); while(j
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
