4 ms·
> With Lmobok, you can use `var` for local variables `var` is part of standard Java, you don't have to use Lombok. > Can't have nice syntax for object literal
by apta 7y ago
> With Lmobok, you can use `var` for local variables
`var` is part of standard Java, you don't have to use Lombok.
> Can't have nice syntax for object literals
Could you elaborate on what you mean by object literals in this context?
- nine_k 7y agoSome shops are still not Java 10, but Lombok helps you use `var` even there.
- nine_k 7y agoObject literals: think JavaScript. const foo = new Bar a = 1, b = 2 } With a default constructor or a builder (both provided by Lombok, maybe with other libraries, too) this level of succinctness is quite achievable in Java, too.