摘要:
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
书丶生
阅读(747)
评论(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
书丶生
阅读(607)
评论(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
书丶生
阅读(131)
评论(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
书丶生
阅读(170)
评论(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
书丶生
阅读(227)
评论(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
书丶生
阅读(152)
评论(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
书丶生
阅读(1886)
评论(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
书丶生
阅读(208)
评论(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
书丶生
阅读(106)
评论(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
书丶生
阅读(127)
评论(0)
推荐(0)
摘要:
执行结果: 阅读全文
posted @ 2019-01-31 10:22
书丶生
阅读(241)
评论(0)
推荐(0)
摘要:
执行结果: 阅读全文
posted @ 2019-01-31 10:18
书丶生
阅读(155)
评论(0)
推荐(0)
摘要:
执行结果: 阅读全文
posted @ 2019-01-31 10:17
书丶生
阅读(154)
评论(0)
推荐(0)
摘要:
集合类概述: 为什么出现集合类? 面向对象语言对事物的体现都是以对象的形式,所以为了方便对多个对象的操作,Java 就提供了集合类。 集合类的特点 集合只用于存储对象,集合长度是可变的,集合可以存储不同类型的对象。 数据结构:数据的存储方式。 多个集合类是有共性的内容的,我们把这些集合类的共性内容不 阅读全文
posted @ 2019-01-31 10:15
书丶生
阅读(255)
评论(0)
推荐(0)
摘要:
是否是键值对象形式: 是:Map 键是否需要排序: 是:TreeMap 否:HashMap 不知道,就使用 HashMap。 否:Collection 元素是否唯一: 是:Set 元素是否需要排序: 是 :TreeSet 否:HashSet 不知道,就使用 HashSet 否:List 要安全吗: 阅读全文
posted @ 2019-01-31 10:14
书丶生
阅读(142)
评论(0)
推荐(0)
摘要:
ArrayXxx:底层数据结构是数组,查询快,增删慢 LinkedXxx:底层数据结构是链表,查询慢,增删快 HashXxx:底层数据结构是哈希表。依赖两个方法:hashCode()和 equals() TreeXxx:底层数据结构是二叉树。两种方式排序:自然排序和比较器排序 阅读全文
posted @ 2019-01-31 10:13
书丶生
阅读(874)
评论(0)
推荐(0)
摘要:
集合:Collection(单列集合) List(有序,可重复) ArrayList 底层数据结构是数组,查询快,增删慢线程不安全,效率高 Vector 底层数据结构是数组,查询快,增删慢线程安全,效率低 LinkedList 底层数据结构是数组链表,查询慢,增删快线程不安全,效率高 Set(无序, 阅读全文
posted @ 2019-01-31 10:10
书丶生
阅读(170)
评论(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
书丶生
阅读(167)
评论(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
书丶生
阅读(1562)
评论(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
书丶生
阅读(458)
评论(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
书丶生
阅读(161)
评论(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
书丶生
阅读(193)
评论(0)
推荐(0)

浙公网安备 33010602011771号