valwas introduced in version 0.10. When usingval, Lombok declares the variable asfinaland automatically infers the type after initializing it. Thus, the initializing expression is mandatory. varwas introduced in
The class body (the area between the braces) contains all the code that provides for the life cycle of the objects created from the class: constructors for initializing new objects, declarations for the fields that provide the state of the class and its objects, and methods to implement the...