查看源码: HashSet底层new 了HashMap 哈希表的结构: Demo: Read More
package cn.sasa.demo1; import java.util.ArrayList; import java.util.LinkedList; import java.util.List; public class ListDemo { public static void main(String[] args) { //Collec... Read More
package cn.sasa.demo1; import java.util.ArrayList; import java.util.Collection; import java.util.Iterator; public class ListDemo { public static void main(String[] args) { //泛型的通配符 ? ... Read More
package cn.sasa.demo1; import java.util.ArrayList; import java.util.Collection; import java.util.Iterator; public class CollectionDemo { public static void main(String[] args) { //Colle... Read More
这是ArrayList的继承树,它继承了AbstractCollection抽象类,AbstractCollection类实现了Collection接口,Collection接口继承Iterable接口 Read More
package cn.sasa.demo5; import java.math.BigDecimal; import java.math.BigInteger; public class BigDataDemo { public static void main(String[] args) { //BigInteger //数字太大,超过了long的... Read More
package cn.sasa.demo4; import java.util.Arrays; public class ArrayDemo { public static void main(String[] args) { int[] arr = {2,1,5,7,3,9,6}; //对数组排序 升序 Arrays.sort(arr... Read More
package cn.sasa.demo3; import java.text.DecimalFormat; public class MathDemo { public static void main(String[] args) { //返回平方根 double sqrtNum = Math.sqrt(4); System.out... Read More
package cn.sasa.demo2; public class SystemDemo { public static void main(String[] args) { func_arraycopy(); } static void func_1() { //currentTimeMillis() 获取当前的毫秒数 返... Read More
package cn.sasa.demo1; public class TestDemo { public static void main(String[] args) { /** *基本数据类型对应的包装类 *char ---- Character *int ------ Integer *byte ---- Byte *short --- Short ... Read More