java-features/java16/jep395-records #24
Replies: 1 comment
-
我们知道class类可以在单独文件中生命,生命 -> 申明/声明(个人感觉声明更适合一点(~ ̄▽ ̄)~) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
java-features/java16/jep395-records
Java 16新特性:record类。以前我们定义类都是用
class
关键词,但从Java 16开始,我们将多一个关键词record
,它也可以用来定义类。record
关键词的引入,主要是为了提供一种更为简洁、紧凑的final
类的定义方式。下面就来具体了解record类的细节。https://www.didispace.com/java-features/java16/jep395-records.html
Beta Was this translation helpful? Give feedback.
All reactions