摘要:
package com.soar.test; import java.util.HashMap; public class Test { /* * * A:案例演示 * 需求:统计字符串中每个字符出现的次数 * 分析: * ① 定义一个需要被统计字符的字符串 * ② 将字符串转换成字符数组 * ③ 阅读全文
posted @ 2017-07-18 16:19
Soar_Sir
阅读(1990)
评论(0)
推荐(0)
摘要:
Student类,属性为name,age 实现接口Comparable,重写comparTo()方法,通过年龄的大小进行排序实现 public class Student implements Comparable<Student>{ @Override public int compareTo(S 阅读全文
posted @ 2017-07-18 15:39
Soar_Sir
阅读(250)
评论(0)
推荐(0)
摘要:
package com.soar.map; import java.util.LinkedHashMap; public class Demo6_LinkedHashMap { /* * LinkedHashMap的特点 * 底层是链表实现的可以保证怎么存就怎么取 * 属于HashMap派系 */ 阅读全文
posted @ 2017-07-18 15:20
Soar_Sir
阅读(158)
评论(0)
推荐(0)

浙公网安备 33010602011771号