Here is the problem I am trying to solve:
Write a program that determines and displays number of lines in a file that you specify on the command line. Example run:
java YourClass test.txt
12 lines in test.txt
I would post "Here is what I know so far", but I literally have no idea how to begin. Do I need to import the IO files for File, PrintWriter classes? Any help would be greatly appreciated.
import java.util.*; import java.io.*; class YourClass { public static void main (String[] args) throws IOException { DataInputStream binIn = new DataInputStream(new FileInputStream(args[0])); int count = 0; } }