Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Adelina Fischer   on Jun 06 In Java Category.

  
Question Answered By: Calandre Bernard   on Jun 06

I think you must use a java.io.BufferedReader (or a
java.io.InputStreamReader with a java.io.FileInputStream if you need
to process  a special character encoding other than system default) to
read the file. You can use a java.io.StreamTokenizer to tokenize file
content. Then you can use a java.util.TreeMap to count the names. The
TreeMap.keySet() gives you the names  and the value associated with
each key in the map can be an Integer showing the number  of its
occurrences.

Share: 

 

This Question has 1 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Processing text file Or get search suggestion and latest updates.


Tagged: