Loading

随笔分类 -  编程语言

摘要:Project Loom 的主要目的是改善 Java 中的线程和异步技术,贡献的核心技术包括协程和结构化并发。 现状 线程:Thread 异步:Future、CompletableFuture JEP Virtual Threads、Structured Concurrency、Scoped Val 阅读全文
posted @ 2024-05-25 07:25 xtyuns 阅读(49) 评论(0) 推荐(0)
摘要:Java 既可以表示 Java 语言,又可以表示为整个 Java 生态。在 Java 生态中存在两份主要的技术规范:Java 语言规范和 JVM 规范:Java Language and Virtual Machine Specifications JLS Java 语法规范(Java Langua 阅读全文
posted @ 2024-05-25 07:05 xtyuns 阅读(73) 评论(0) 推荐(0)
摘要:> https://javascript.info/script-async-defer ## 使用方式 首先来看一下以下三种不同的 js 引入方式: ```html ``` ## 区别 先看一张图 ![async scripts, defer scripts, module scripts: ex 阅读全文
posted @ 2021-10-08 19:25 xtyuns 阅读(113) 评论(0) 推荐(0)
摘要:MySQL 中的 datetime 对应 Java 中的 java.util.date, 如果使用 java.sql.date 时分秒将会丢失。 阅读全文
posted @ 2021-09-24 19:48 xtyuns 阅读(4236) 评论(0) 推荐(1)
摘要:## 代码示例 ```java public static void main(String[] args) { int value = 0; IntStream.range(0, 10).forEach(i -> value++); System.out.println(value); } ``` 阅读全文
posted @ 2021-09-19 18:49 xtyuns 阅读(1351) 评论(0) 推荐(2)
摘要:## 使用方法 一、Child.class ```java package proxys; public interface Child { void eat(); } ``` 二、ChildImpl.class ```java package proxys; public class ChildI 阅读全文
posted @ 2021-08-20 15:52 xtyuns 阅读(104) 评论(0) 推荐(0)
摘要:执行下面这段 Java 代码,它的输出结果为:`调用子类的 addAge(), age=1` ```Java public class ClassInit { public static void main(String[] args) { Son son = new Son(); } } clas 阅读全文
posted @ 2021-07-31 14:41 xtyuns 阅读(120) 评论(0) 推荐(0)
摘要:```javascript 1.3335.toFixed(3); // 1.333 1.33335.toFixed(4); //1.3334 ``` 无论是用奇数进位法,还是偶数进位法,都无法正确的解释 js 中 toFixed() 方法。 相关阅读: [为什么我说 Math.round 和 toF 阅读全文
posted @ 2021-07-07 20:22 xtyuns 阅读(132) 评论(0) 推荐(0)