sort words by length and then by alphabetical order

后端 未结 4 1659
既然无缘
既然无缘 2021-01-29 06:22

Below you can see my code. It reads words from dictionary and copy words that match specific patern to test.txt. My qusetion is how to sort words in test.txt first by LENGTH and

4条回答
  •  無奈伤痛
    2021-01-29 06:50

    Try looking at the Collections framework List might be a good place to start, and look at Comparable/Comparators. That might help.

提交回复
热议问题