笔记备份:2025-08-19 23:17:39
This commit is contained in:
4
.obsidian/plugins/keep-the-rhythm/data.json
vendored
4
.obsidian/plugins/keep-the-rhythm/data.json
vendored
@@ -520,11 +520,11 @@
|
||||
}
|
||||
},
|
||||
"2025-08-19": {
|
||||
"totalDelta": 340,
|
||||
"totalDelta": 768,
|
||||
"files": {
|
||||
"A1-Work/语言/Java/基础学习.md": {
|
||||
"initial": 8304,
|
||||
"current": 8644
|
||||
"current": 9072
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
16
.obsidian/plugins/novel-word-count/data.json
vendored
16
.obsidian/plugins/novel-word-count/data.json
vendored
@@ -463,20 +463,20 @@
|
||||
"isCountable": true,
|
||||
"targetNodeType": "file",
|
||||
"noteCount": 1,
|
||||
"wordCount": 2895,
|
||||
"wordCount": 2897,
|
||||
"wordCountTowardGoal": 0,
|
||||
"wordGoal": null,
|
||||
"pageCount": 9.65,
|
||||
"characterCount": 9589,
|
||||
"nonWhitespaceCharacterCount": 7735,
|
||||
"newlineCount": 376,
|
||||
"readingTimeInMinutes": 6.510075471698113,
|
||||
"pageCount": 9.656666666666666,
|
||||
"characterCount": 9596,
|
||||
"nonWhitespaceCharacterCount": 7739,
|
||||
"newlineCount": 378,
|
||||
"readingTimeInMinutes": 6.5140754716981135,
|
||||
"linkCount": 0,
|
||||
"embedCount": 1,
|
||||
"aliases": null,
|
||||
"createdDate": 1753961160249,
|
||||
"modifiedDate": 1755607747424,
|
||||
"sizeInBytes": 15037,
|
||||
"modifiedDate": 1755616075270,
|
||||
"sizeInBytes": 15048,
|
||||
"sessionStart": {
|
||||
"noteCount": 1,
|
||||
"pageCount": 2.1566666666666667,
|
||||
|
||||
@@ -356,7 +356,41 @@ assert 条件: 表达式;
|
||||
7. FINEST
|
||||
|
||||
## 泛型
|
||||
### 简单泛型
|
||||
```Java
|
||||
public class Pair<T> {
|
||||
T first;
|
||||
T second;
|
||||
|
||||
Pair(T first, T second)
|
||||
|
||||
T getFirst()
|
||||
T getSecond()
|
||||
|
||||
void setFirst(T newValue)
|
||||
void setSecond(T newValue)
|
||||
}
|
||||
```
|
||||
|
||||
又或者
|
||||
|
||||
```Java
|
||||
public class Pair<T, U> {
|
||||
T first;
|
||||
U second;
|
||||
|
||||
Pair(T first, U second)
|
||||
|
||||
T getFirst()
|
||||
U getSecond()
|
||||
|
||||
void setFirst(T newValue)
|
||||
void setSecond(U newValue)
|
||||
}
|
||||
```
|
||||
|
||||
> [!tip] 提示
|
||||
> 在 Java 库中,常使用 `E` 表示集合元素类型,`K` 和 `V` 表示键值对,T(需要时还可以使用临近字母 `U` 和 `S`)表示“任意类型”。
|
||||
|
||||
## JDK 特性
|
||||
|
||||
|
||||
Reference in New Issue
Block a user