摘要: 一、获取年月日时分秒 public class Laugh { public static void main(String[] args) { System.out.println("获取当前时间为:"); //格式为:2021-10-12 16:48:14 Date date = new Dat 阅读全文
posted @ 2021-10-12 17:57 Laugh" 阅读(1812) 评论(0) 推荐(5) 编辑
摘要: 一. 基础运算:加 / 减 / 乘 / 除 / 取余 public class Laugh { public static void main(String[] args) { //二元运算符 System.out.println(" 二元运算符 正常计算 "); int a = 10; int b 阅读全文
posted @ 2021-10-12 11:36 Laugh" 阅读(55) 评论(0) 推荐(5) 编辑
摘要: 一. 常量,变量说明(附源码) public class Laugh { //重点: 在未声明之前输出的话 String 默认值为 null; int 默认值为 0; boolean 的默认值为 false; float 默认值为 0.0; double 默认值为 0.0; //我是实例变量 可以不 阅读全文
posted @ 2021-10-12 11:09 Laugh" 阅读(44) 评论(0) 推荐(4) 编辑