Hi,

i know how to open a file and read data from it
but i wanna print out the number of lines in that file ?

How would i go about this ?

BufferedReader, it's readLine method, and a counter variable.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.