2020年12月26日
摘要: String是只读字符串,它并不是基本数据类型,而是一个对象。 从底层源码来看是一个final类型的字符数组 private final char value[]; String所引用的字符串不能被改变,一经定义,无法再增删改。 每次对String的操作都会生成新的String对象。 每次+操作 : 阅读全文
posted @ 2020-12-26 18:06 剑舞红颜笑i 阅读(57) 评论(0) 推荐(0)
摘要: public class Transaction { private final Trader trader; private final int year; private final int value; public Transaction(Trader trader, int year, i 阅读全文
posted @ 2020-12-26 17:47 剑舞红颜笑i 阅读(60) 评论(0) 推荐(0)
摘要: 创建数据库表格 drop table if EXISTS stu; create table if not EXISTS stu( id int primary key, -- 主键约束 name varchar(24) not null unique, -- 非空、唯一约束 age int, se 阅读全文
posted @ 2020-12-26 16:34 剑舞红颜笑i 阅读(29) 评论(0) 推荐(0)
摘要: package experencetext; import java.util.Scanner; /** @version 1.0 @Description TODO @Author scar @Date 2020/12/26 10:29 判断是否是闰年 判断闰年条件: 1.普通年份 可以被4整除 阅读全文
posted @ 2020-12-26 11:42 剑舞红颜笑i 阅读(157) 评论(0) 推荐(0)