
9.集合 Collections
文章平均质量分 74
普通网友
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Collections 操作
import java.util.ArrayList; import java.util.Collections; import java.util.Enumeration; import java.util.Vector; public class SortAr原创 2011-09-28 22:44:18 · 780 阅读 · 0 评论 -
9.34.6.用Strore存储 Use store() to save the properties
import java.io.FileInputStream; import java.io.FileOutputStream; import java.util.Properties; public class StoreProperties{ public static void main(String[] args) throws Exception{ Properties翻译 2012-03-23 11:30:50 · 580 阅读 · 0 评论 -
9.34.8.使用枚举循环属性 Using Enumeration to loop through Properties
import java.util.Enumeration; import java.util.Properties; public class EnumerationProperties{ public static void main(String[] args) { Properties properties = System.getProperties(); /*翻译 2012-03-23 11:46:37 · 1163 阅读 · 0 评论 -
9.34.9.向Property list 里添加值 Put value to a Property list.
import java.util.Properties; import java.util.Set; public class PutValueProperties{ public static void main(String[] args){ Properties capitals = new Properties(); /* capitals.put("Illinois"翻译 2012-03-23 13:34:28 · 739 阅读 · 0 评论 -
一道逻辑性问题-ArrayList使用方法
import java.util.ArrayList;//引入类 public class TextArrayList {// 操作使用ArrayList判断谁养鱼 private static String[] HOUSES = { "红房子", "白房子", "绿房子", "蓝房子", "黄房子" }; private static String[] PERSONS = { "英国人",翻译 2011-11-17 10:23:52 · 989 阅读 · 0 评论 -
9. 13. 6. Stack基本用法 To find out if an element is on the stack: the search() method
import java.util.Stack; public class StackLastinFirstout { public static void main(String[] args) { Stack s = new Stack();翻译 2011-09-29 21:10:07 · 632 阅读 · 0 评论 -
9. 13. 7. Demonstrate the generic Stack class.
Demonstrate 演示 generic 通用、泛型 import java.util.EmptyStackException; import java.util.Stack; public class StackDemo { static void sho翻译 2011-09-29 21:23:29 · 516 阅读 · 0 评论 -
双色球数据txt读入JTable
import java.awt.BorderLayout; import java.io.BufferedReader; import java.io.FileNotFoundException; import java.io.FileReader; import jav原创 2011-10-12 14:21:59 · 3908 阅读 · 3 评论 -
9. 11. 30. 从asList到toArray转换 -Convert a List (ArrayList) to an Array with zero length array
import java.util.ArrayList; import java.util.List; public class Main { public static void main(String[] args) { List carList = n翻译 2011-09-29 19:23:35 · 1547 阅读 · 0 评论 -
9. 11. 27. 写与读自己封装ArrayList implements the empty Serializable interface
import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.ObjectInputStream; import java.io.ObjectOutputStream;翻译 2011-09-29 19:19:35 · 671 阅读 · 0 评论 -
insertElementAt 反转参数的顺序
import java.util.Vector; public class InsertElementAtDemo { public static void main(String[] args) { Vector v = new Vector(5);翻译 2011-09-29 18:58:38 · 848 阅读 · 0 评论 -
9. 4. 1. 二维数组矩阵 Initialize a two-dimensional array in matrix
Initialize 初始化; dimensional 空间;matrix 矩阵 黑客帝国; public class TwoDimensionalArray { public static void main(String[] args) { double m[翻译 2011-09-29 14:37:04 · 920 阅读 · 0 评论 -
9. 2. 17. 轮换指定列表中的元素Rotate elements of a collection
import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.List; public class RotateCollect翻译 2011-09-29 11:08:18 · 638 阅读 · 0 评论 -
搜索Collections元素,用DateFormatSymbols 获得月份
import java.util.Collections; import java.util.List; import java.text.DateFormatSymbols; import java.util.LinkedList; public class S翻译 2011-09-29 10:40:11 · 1943 阅读 · 0 评论 -
数组再分配 ArrayReallocationDemo
import java.util.Arrays; public class ArrayReallocationDemo {//Reallocation 再分配的意思 public static void main(String[] args) { int[翻译 2011-09-29 13:26:27 · 527 阅读 · 0 评论 -
9. 2. 18. 自然顺序颠倒顺序Sort items of an ArrayList with Collections.reverseOrder()
import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.List; public class SortItems {翻译 2011-09-29 11:25:20 · 1228 阅读 · 0 评论 -
Comparator
import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import java.util.Enumeration; import java.util.Ve翻译 2011-09-28 22:53:57 · 569 阅读 · 0 评论 -
9.34.2.使用系统属性 using properties
import java.io.FileInputStream; import java.util.Properties; public class PropertiesTest2{ public static void main(String[] args) throws Exception{ Properties properties = System.getProperties(翻译 2012-03-23 11:06:57 · 711 阅读 · 0 评论