1. DDL
1.1 操作数据库
--创建库
create database 库名;--创建库时判断库是否存在,不存在则创建
create database if no exists 库名;--查看所有数据库
show databases;--使用指定数据库
use 库名;--查看当前指定数据库包含的数据表
show tables;--查看数据库的结…
package ArrayListDemo;import java.util.ArrayList;public class ArrayListDemo7 {public static void main(String[] args) {//1.创建集合对象ArrayList<Phone> list new ArrayList<Phone>();//2.创建手机对象Phone ph1 new Phone("小米",1000);Pho…
目录 1、使用2、加锁解析1、getLock2、tryLock2.1、当ttl为null时为加锁成功,返回true,否则继续往下执行,判断是否超过等待时间,当前时间减去获取锁前时间就是获取锁花费时间。2.2、tryAcquire(leaseTime, unit, threadId)2.3 、renewExpirat…