Menu

Write Method Countlines String Infilename Class Fileutility Reads Binary Byte File Name In Q43785367

Write a method countLines(String inFilename) of a classFileUtility which reads a binary byte file with name inFilenameusing FileInputStream. The method returns the no. of linescontaining comments starting with “//” with optional spaces (butnot other characters) before it. Each line is terminated by ‘n’.You may write other methods if necessary. Handle possible exceptionby outputting a suitable message if an exception occurs.

Expert Answer


Answer to Write a method countLines(String inFilename) of a class FileUtility which reads a binary byte file with name inFilename …

OR