![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
hashmap
搬砖-程序员
努力学习,请多指教。
展开
-
redis存入map数据并取出
使用idea中编写代码进行简单的map数据存入redis并取出下面是具体代码,一看就知道了 就不具体解释了/*** 将map集合数据存入redis中存储*/public class RedisCunchu {public static void main(String[] args) {//连接redisJedis jedis = new Jedis(“localhost”,6379);//设置map集合数据,并将其存入redis中Map map = new HashMap();map原创 2021-03-12 11:40:10 · 3506 阅读 · 0 评论 -
java 学习 使用HashMap统计字符串中字符出现的次数
使用HashMap统计字符串中字符出现的次数思路:输入一个字符串将字符串转换成字符数组创建HashMap对象使用for循环,将值存入集合中输出结果具体代码注释如下://统计字符串中每个字符出现的次数public class Test04 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); //输入字符串 System.out.p原创 2020-08-20 11:25:15 · 592 阅读 · 0 评论