Data inconsistency using ConcurrentHashMap
问题 The count changes for every run for the same set of files. The following code is still not data consistent. How to make thread safe? Simple word count code. package ConcurrentHashMapDemo; import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; class FileReaderTask implements Runnable { private String filePath; private String fileName; private ConcurrentMap