文件名称:IOStream
- 所属分类:
- JSP源码/Java
- 资源属性:
- [MacOS] [Java] [源码]
- 上传时间:
- 2015-09-11
- 文件大小:
- 3kb
- 下载次数:
- 0次
- 提 供 者:
- da***
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
打开第11 章中讲到的IOStreamDemo.java 文件,一次读取其中的一行,令每行形成一个String 对象。然后利用java.util.Comparator 接口重新定义String 对象间的比较方法:将每个String 中的小写字母转为大写后再进行比较。使用该比较法对这些String 进行排序,按从大到小的顺序存入一个LinkedList。最后将LinkedList 中的String 按存入的相反顺序输出到另一个文件inverse.txt 中。-Open the IOStreamDemo.java file in the eleventh chapter, a line to read, so that each line to form a String object. Then use the java.util.Comparator interface to redefine the String object
Comparison method: the lower case letters in each of the String to the capital after the comparison. Using the comparison
Method to sort these String, in order to deposit a LinkedList large to small. In the end, the String of the LinkedList is stored in the opposite order of the inverse.txt.
Comparison method: the lower case letters in each of the String to the capital after the comparison. Using the comparison
Method to sort these String, in order to deposit a LinkedList large to small. In the end, the String of the LinkedList is stored in the opposite order of the inverse.txt.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
Test5.class
IOStreamDemo.java