Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8c9a864

Browse filesBrowse files
committed
内容格式修改: 添加了问题和答案两个二级标题
1 parent 796f78e commit 8c9a864
Copy full SHA for 8c9a864

File tree

Expand file treeCollapse file tree

1 file changed

+3
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-1
lines changed

‎contents/what-is-a-serialversionuid-and-why-should-i-use-it.md

Copy file name to clipboardExpand all lines: contents/what-is-a-serialversionuid-and-why-should-i-use-it.md
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
# serialVersionUID 有什么作用?该如何使用?
1+
# serialVersionUID 有什么作用?该如何使用?
2+
##问题
23

34
当一个对象实现 Serializable 接口时,多数 ide 会提示声明一个静态常量 serialVersionUID(版本标识),那 serialVersionUID 到底有什么作用呢?应该如何使用 serialVersionUID ?
45

6+
##回答
57
serialVersionUID 是实现 Serializable 接口而来的,而 Serializable 则是应用于Java 对象序列化/反序列化。对象的序列化主要有两种用途:
68

79
- 把对象序列化成字节码,保存到指定介质上(如磁盘等)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.