上一页 1 2 3 4 5 6 7 8 ··· 10 下一页
摘要: package com.companyname.common.test; import java.util.ArrayList; import java.util.Random; /** * @Description 获取 10 个 1-20 之间的随机数,要求不能重复 * @Author Created by shusheng. * @Email shusheng@yiji.com ... 阅读全文
posted @ 2019-01-31 10:33 书丶生 阅读(719) 评论(0) 推荐(1) 编辑
摘要: package com.yjf.esupplier.common.test; import com.yjf.common.util.ToString; import java.util.ArrayList; /** * @author shusheng * @description 集合的嵌套遍历 * @Email shusheng@yiji.com * @date 2018/1... 阅读全文
posted @ 2019-01-31 10:31 书丶生 阅读(592) 评论(0) 推荐(0) 编辑
摘要: package com.yjf.esupplier.common.test; import java.util.ArrayList; import java.util.Iterator; /** * @author shusheng * @description 去除集合中字符串的重复值(字符串的内容相同) * @Email shusheng@yiji.com * @date 201... 阅读全文
posted @ 2019-01-31 10:30 书丶生 阅读(121) 评论(0) 推荐(0) 编辑
摘要: package com.yjf.esupplier.common.test; import java.util.ArrayList; import java.util.HashSet; import java.util.Iterator; /** * @author shusheng * @description * @Email shusheng@yiji.com * @date ... 阅读全文
posted @ 2019-01-31 10:30 书丶生 阅读(160) 评论(0) 推荐(0) 编辑
摘要: package com.yjf.esupplier.common.test; import java.util.ArrayList; import java.util.Iterator; /** * @author shusheng * @description 去除集合中字符串的重复值(字符串的内容相同) * @Email shusheng@yiji.com * @date 201... 阅读全文
posted @ 2019-01-31 10:29 书丶生 阅读(218) 评论(0) 推荐(0) 编辑
摘要: package com.yjf.esupplier.common.test; import java.util.Enumeration; import java.util.Vector; /** * @author shusheng * @description * @Email shusheng@yiji.com * @date 2018/12/12 15:48 */ publi... 阅读全文
posted @ 2019-01-31 10:28 书丶生 阅读(142) 评论(0) 推荐(0) 编辑
摘要: package com.yjf.esupplier.common.test; import java.util.ArrayList; import java.util.List; import java.util.ListIterator; /** * @author shusheng * @description * @Email shusheng@yiji.com * @date... 阅读全文
posted @ 2019-01-31 10:27 书丶生 阅读(1870) 评论(1) 推荐(0) 编辑
摘要: package com.yjf.esupplier.common.test; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.ListIterator; /** * @author shusheng * @description * @Email... 阅读全文
posted @ 2019-01-31 10:26 书丶生 阅读(202) 评论(0) 推荐(0) 编辑
摘要: package com.yjf.esupplier.common.test; import java.util.ArrayList; import java.util.Collection; import java.util.Iterator; /** * @author shusheng * @description * @Email shusheng@yiji.com * @da... 阅读全文
posted @ 2019-01-31 10:25 书丶生 阅读(99) 评论(0) 推荐(0) 编辑
摘要: package com.yjf.esupplier.common.test; import java.util.LinkedList; /** * @author shusheng * @description * @Email shusheng@yiji.com * @date 2018/12/12 15:24 */ public class LinkedListDemo { ... 阅读全文
posted @ 2019-01-31 10:23 书丶生 阅读(124) 评论(0) 推荐(0) 编辑
摘要: 执行结果: 阅读全文
posted @ 2019-01-31 10:22 书丶生 阅读(232) 评论(0) 推荐(0) 编辑
摘要: 执行结果: 阅读全文
posted @ 2019-01-31 10:18 书丶生 阅读(152) 评论(0) 推荐(0) 编辑
摘要: 执行结果: 阅读全文
posted @ 2019-01-31 10:17 书丶生 阅读(151) 评论(0) 推荐(0) 编辑
摘要: 集合类概述: 为什么出现集合类? 面向对象语言对事物的体现都是以对象的形式,所以为了方便对多个对象的操作,Java 就提供了集合类。 集合类的特点 集合只用于存储对象,集合长度是可变的,集合可以存储不同类型的对象。 数据结构:数据的存储方式。 多个集合类是有共性的内容的,我们把这些集合类的共性内容不 阅读全文
posted @ 2019-01-31 10:15 书丶生 阅读(247) 评论(0) 推荐(0) 编辑
摘要: 是否是键值对象形式: 是:Map 键是否需要排序: 是:TreeMap 否:HashMap 不知道,就使用 HashMap。 否:Collection 元素是否唯一: 是:Set 元素是否需要排序: 是 :TreeSet 否:HashSet 不知道,就使用 HashSet 否:List 要安全吗: 阅读全文
posted @ 2019-01-31 10:14 书丶生 阅读(136) 评论(0) 推荐(0) 编辑
摘要: ArrayXxx:底层数据结构是数组,查询快,增删慢 LinkedXxx:底层数据结构是链表,查询慢,增删快 HashXxx:底层数据结构是哈希表。依赖两个方法:hashCode()和 equals() TreeXxx:底层数据结构是二叉树。两种方式排序:自然排序和比较器排序 阅读全文
posted @ 2019-01-31 10:13 书丶生 阅读(842) 评论(0) 推荐(0) 编辑
摘要: 集合:Collection(单列集合) List(有序,可重复) ArrayList 底层数据结构是数组,查询快,增删慢线程不安全,效率高 Vector 底层数据结构是数组,查询快,增删慢线程安全,效率低 LinkedList 底层数据结构是数组链表,查询慢,增删快线程不安全,效率高 Set(无序, 阅读全文
posted @ 2019-01-31 10:10 书丶生 阅读(165) 评论(0) 推荐(0) 编辑
摘要: package test; import java.io.*; /** * @author shusheng * @description 序列化与反序列化流 * @Email shusheng@yiji.com * @date 2018/12/23 16:49 */ public class ObjectStreamDemo { //当有些变量不需要序列化时使用 tran... 阅读全文
posted @ 2019-01-31 10:02 书丶生 阅读(162) 评论(0) 推荐(0) 编辑
摘要: package test; import java.io.*; import java.util.Enumeration; import java.util.Vector; /** * @author shusheng * @description * @Email shusheng@yiji.com * @date 2018/12/23 15:55 */ public class... 阅读全文
posted @ 2019-01-31 10:01 书丶生 阅读(1548) 评论(0) 推荐(0) 编辑
摘要: package test; import java.io.*; /** * @author shusheng * @description 复制两个文件中的内容到一个文件中 * @Email shusheng@yiji.com * @date 2018/12/23 15:43 */ public class SequenceInputStreamDemo { /** ... 阅读全文
posted @ 2019-01-31 10:00 书丶生 阅读(438) 评论(0) 推荐(0) 编辑
摘要: package test; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; /** * @author shusheng * @description 内存操作流(处理临时信息) * @Email shusheng@yiji.co... 阅读全文
posted @ 2019-01-31 09:59 书丶生 阅读(158) 评论(0) 推荐(0) 编辑
摘要: package test; import java.io.*; /** * @author shusheng * @description 操作基本数据类型的流 * @Email shusheng@yiji.com * @date 2018/12/23 0:08 */ public class DataStreamDemo { public static void main... 阅读全文
posted @ 2019-01-31 09:58 书丶生 阅读(191) 评论(0) 推荐(0) 编辑
摘要: package com.yjf.esupplier.common.test; import java.io.*; /** * @author shusheng * @description * @Email shusheng@yiji.com * @date 2018/12/8 14:34 */ public class CopyFolderDemo { public s... 阅读全文
posted @ 2018-12-08 15:35 书丶生 阅读(543) 评论(0) 推荐(0) 编辑
摘要: package com.companyname.common.test; import java.io.*; /** * @Description * @Author Created by shusheng. * @Email shusheng@yiji.com * @Date 2018/12/2 */ public class CopyFolderDemo { publ... 阅读全文
posted @ 2018-12-08 11:08 书丶生 阅读(803) 评论(0) 推荐(0) 编辑
摘要: package com.companyname.common.test; import java.io.*; import java.util.ArrayList; import java.util.Random; /** * @Description * @Author Created by shusheng. * @Email shusheng@yiji.com * @Date ... 阅读全文
posted @ 2018-12-08 11:01 书丶生 阅读(309) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 10 下一页