摘要: import java.util.concurrent.locks.ReentrantLock; // 线程 操作资源库 class Tickets { private int nums = 30; ReentrantLock lock = new ReentrantLock(); public v 阅读全文
posted @ 2020-08-04 22:27 z_先生 阅读(163) 评论(0) 推荐(0) 编辑
摘要: public class ThreadTest { public static void main(String[] args) { for (int i = 0; i < 10; i++) { Thread thread = new Thread(() -> { for (int j = 0; j 阅读全文
posted @ 2020-08-04 22:23 z_先生 阅读(51) 评论(0) 推荐(0) 编辑
摘要: 没设么好说的 要的就是证明 public class VolatileTest { public static void main(String[] args) { MyRunnable myRunnable = new MyRunnable(); Thread thread = new Threa 阅读全文
posted @ 2020-08-04 22:18 z_先生 阅读(180) 评论(0) 推荐(0) 编辑
摘要: 先看2张表student score CREATE TABLE `score` ( `id` int NOT NULL AUTO_INCREMENT, `stu_id` int NOT NULL, `c_name` varchar(20) DEFAULT NULL, `grade` int DEFA 阅读全文
posted @ 2020-08-04 21:03 z_先生 阅读(136) 评论(0) 推荐(0) 编辑
摘要: 包名:com.bianmirj.util 类名:DateUtil 静态变量:CURRENT_YEAR 静态方法:sLeapYear <select id="login" resultType="User"> select id, username, password from user order 阅读全文
posted @ 2020-08-04 20:44 z_先生 阅读(549) 评论(0) 推荐(0) 编辑