Solved

The File Data

Question 47

Essay

The file data.txt contains names. Converting the file data.txt into a Stream, compute and output how many names are in data.txt.
try
{
// Your code goes here
}
catch ( InvalidPathException ipe )
{
System.out.println( ipe.getMessage( ) );
}
catch ( IOException ioe )
{
System.out.println( "Could not find file: " + ioe.getMessage( ) );
}
catch ( SecurityException se )
{
System.out.println( se.getMessage( ) );
}

Correct Answer:

verifed

Verified

Stream names = Files.l...

View Answer

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions