随笔 - 42  文章 - 0 评论 - 1 阅读 - 18177
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

随笔分类 -  java基础

异常
摘要:InterruptedException if the current thread was interrupted while waiting (如果当前线程在等待时被打断) PacketTooBigException mysql的单条数据默认限制大小为4M,如果单条数据超过4M就会报这个错,但是 阅读全文
posted @ 2022-07-26 13:38 我叫福禄娃 阅读(13) 评论(0) 推荐(0) 编辑
java.util.concurrent juc基础入门学习
摘要:/** * juc java.util.concurrent 工具包的简称 处理线程的工具包 * * 线程状态 * NEW 新建 * RUNNABLE 准备就绪 * BLOCKED 阻塞 * WAITING 等待 * TIMED_WAITING 等待 * TERMINATED 结束 * * wait 阅读全文
posted @ 2022-07-20 22:43 我叫福禄娃 阅读(30) 评论(0) 推荐(0) 编辑
java8 新特性
摘要:lombda表达式,又称语法糖,作用在于简化开发,将匿名内部类(语法糖,不具有改变原变量的能力,) lombda表达式的特性:在不使用的情况不会加载,一直处于懒加载状态 public class demo21 { public static void main(String[] args) { Li 阅读全文
posted @ 2022-07-05 13:46 我叫福禄娃 阅读(56) 评论(0) 推荐(0) 编辑
参数传递
摘要:public class DemoTest5 { public static void main(String[] args) { int i = 1; String str = "hello"; Integer num = 2; //缓存范围是-128到127 超过缓存范围则存入堆中,没超过就存入 阅读全文
posted @ 2021-11-12 20:19 我叫福禄娃 阅读(47) 评论(0) 推荐(0) 编辑
代码执行顺序
摘要:public class Demotest3 { private int anInt = test(); private static int j = method(); static { System.out.println("1"); } Demotest3(){ System.out.prin 阅读全文
posted @ 2021-11-12 19:54 我叫福禄娃 阅读(119) 评论(1) 推荐(0) 编辑
单例设计模式
摘要:/** * 标准的饿汉式单例设计模式 */public enum DemoTest { DEMO_TEST("a","b"); private String name; private String age; public String getName() { return name; } publ 阅读全文
posted @ 2021-11-12 19:17 我叫福禄娃 阅读(17) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示