文件名称:IOStream
-
所属分类:
- 标签属性:
- 上传时间:2015-09-11
-
文件大小:2.58kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
打开第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
IOStreamDemo.java
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.