摘要: 一般大家都知道ArrayList和LinkedList的区别: 1、ArrayList的实现是基于数组,LinkedList的实现是基于双向链表。 2、对于随机访问,ArrayList优于LinkedList 3、对于插入和删除操作,LinkedList优于ArrayList 4、LinkedLis 阅读全文
posted @ 2023-11-27 10:38 曦欸 阅读(127) 评论(0) 推荐(0)
摘要: 🍦Iterator接口在程序开发中,经常需要遍历集合中的所有元素。针对这种需求,JDK专门提供了一个接口java.util.Iterator。Iterator接口也是Java集合中的一员,但它与Collection、Map接口有所不同,Collection接口与Map接口主要用于存储元素,而Ite 阅读全文
posted @ 2023-11-27 10:36 曦欸 阅读(100) 评论(0) 推荐(0)
摘要: 第一种 Set set = map.keySet(); for (Object o : set) { System.out.println(o+""+map.get(o)); } 第二种 Set set = map.keySet(); Iterator iterator = set.iterator 阅读全文
posted @ 2023-11-27 10:35 曦欸 阅读(260) 评论(0) 推荐(0)
摘要: SimpleDateFormat slf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); Date date = new Date(); Date date1 = null; String d = "2023-1-1 11:11:11"; try { d 阅读全文
posted @ 2023-11-18 15:12 曦欸 阅读(65) 评论(0) 推荐(0)
摘要: //定义时间格式 SimpleDateFormat slf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); //获取当前时间 Date date = new Date(); //转换时间戳用long接收 long time = date.getTime( 阅读全文
posted @ 2023-11-18 15:12 曦欸 阅读(40) 评论(0) 推荐(0)
摘要: 1.基础模糊查询 1.1查询 三 字结尾的数据 select * from a where `name` like '%三' 1.2查询 张 字开头的数据 select * from a where `name` like '张%' 1.3所以模糊查询查询全部数据 . select * from a 阅读全文
posted @ 2023-11-18 15:12 曦欸 阅读(589) 评论(0) 推荐(0)
摘要: 1. 分组查询 分组查询分别是:group by 和 having select `name`,SUM(price) from a GROUP BY `name` 通过名字分组查询 在一条select语句当中,如果有group by语句的话,select后面只能跟参加分组的字段以及分组函数,其它的一 阅读全文
posted @ 2023-11-18 15:09 曦欸 阅读(62) 评论(0) 推荐(0)
摘要: 1.DDL(数据定义语言) : DDL主要用于定义数据库对象,如创建、修改和删除表、索引、视图、序列等对象。常用的DDL命令包括:CREATE、ALTER、DROP、TRUNCATE等 2. DML(数据操作语言) : DML主要用于对数据库中的数据进行操作,如插入、更新和删除数据等。常用的 DML 阅读全文
posted @ 2023-11-18 11:39 曦欸 阅读(206) 评论(0) 推荐(0)
摘要: 1.登录博客园,点击写随笔 2.点击新增随笔,编辑内容 3.设置发布类型 阅读全文
posted @ 2023-11-13 09:36 曦欸 阅读(36) 评论(0) 推荐(0)