utils
Class FileLineCounter

java.lang.Object
  |
  +--utils.FileLineCounter

public class FileLineCounter
extends java.lang.Object


Constructor Summary
FileLineCounter()
           
 
Method Summary
static int countLines(java.lang.String fileName)
          Method countLines.
static void main(java.lang.String[] args)
           
static boolean sameLineNumber(java.lang.String f1Name, java.lang.String f2Name)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileLineCounter

public FileLineCounter()
Method Detail

countLines

public static int countLines(java.lang.String fileName)
Method countLines. Count the number of lines in the specified file, and print the number to standard output. If an error occurs while processing the file, print an error message instead. Two try...catch statements are used so I can give a different error message in each case.

Parameters:
fileName -
Returns:
int

sameLineNumber

public static boolean sameLineNumber(java.lang.String f1Name,
                                     java.lang.String f2Name)

main

public static void main(java.lang.String[] args)