Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Post History
Although record classes in Java are implicitly final, it's valid to add the final modifier/keyword when declaring a record: final public record Person(String name, String location) {} Does fina...
#2: Post edited
Although record classes in Java are [implicitly final](https://openjdk.org/jeps/395#Rules-for-record-classes), it's still valid to add the `final` modifier/keyword when declaring a record:- final public record Person(String name, String location) {}
- Does `final` carry any special meaning here? Does it change the behavior of this record?
- Although record classes in Java are [implicitly final](https://openjdk.org/jeps/395#Rules-for-record-classes), it's valid to add the `final` modifier/keyword when declaring a record:
- final public record Person(String name, String location) {}
- Does `final` carry any special meaning here? Does it change the behavior of this record?
#1: Initial revision
Java record with final keyword
Although record classes in Java are [implicitly final](https://openjdk.org/jeps/395#Rules-for-record-classes), it's still valid to add the `final` modifier/keyword when declaring a record: final public record Person(String name, String location) {} Does `final` carry any special meaning here? Does it change the behavior of this record?