This article is a mirror article of machine translation, please click here to jump to the original article.

View: 11183|Reply: 0

[Java Source Code] Map usage, method calling

[Copy link]
Posted on 10/13/2018 2:41:30 PM | | | |
Text file of the test

新建文本文档.txt (1.07 KB, Number of downloads: 0)




Run the result



Complete the count of words in the text file

Read, add, output three static methods complete the function

io stream reads the text file, concatenates with strings, and returns

Split string added to TreeMap, equals to compare whether the key is the same, if the same value ++, it is used to count the number of times the key appears, and returns the map

calling mapgetKey() ,getValue(), size() method to get the key, value, size





Previous:vs code TSLint common error solution
Next:The Lianzhong verification code identifies the VB source code
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com