0

Hi everybody,
actually i am new to Java,
and i would like to write a program that to find who is a copycat,
for example, i get six txt file, all of these are juz put inside a folder,
i guess i should get all the txt file to array,
but i can only read these one by one,
how can i get the txt files like get all txt in the folder?
and also how to compare the different between the txt file?

Edited by billy leung: n/a

2
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by billy leung
1

You will eventually have to read them.
You can make a checksum on the files content. If the checksums are different they are obviously not equals. If the cheksums are the same then no choice than comparing them line per line.

0

You will eventually have to read them.
You can make a checksum on the files content. If the checksums are different they are obviously not equals. If the cheksums are the same then no choice than comparing them line per line.

thx at first, and i cant believe that i can get a reply so fast :D
btw, i juz searched a bit about checksum, is that juz checking the value of the String?
i dun reli understand how does it work..

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.