Solved

Complete the Following Code Snippet That Counts the Number of Data

Question 15

Multiple Choice

Complete the following code snippet that counts the number of data lines in the students.csv file, ignoring the first line that contains the field headers.
try (Stream<String> lineStream = Files.lines(Paths.get("students.csv") ) )
{
long dataCount = lineStream
_____________________
.count() ;
}


A) .take(1)
B) .filter(1)
C) .skip(1)
D) .limit(1)

Correct Answer:

verifed

Verified

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

Related Questions