As a Java developer, while working, I frequently stumble upon some concepts, questions, or topics, and I look on the internet for the answers.
Over time, I realized that I do forget some of them and must look them up or reexamine them.
Here in this blog, I am maintaining topics and questions I am searching which I get while doing my day-to-day Java work.
I am going to update this blog on a daily basis.
@PathVariable vs @PathParameter
**A PathVariable -> Jersy term
PathParameter --> Spring Boot term
Java Package naming convention
Domain Name | Package Name Prefix |
hyphenated-name.example.org | org.example.hyphenated_name |
example.int | int_.example |
123name.example.com | com.example._123name |
when a package name is complicated, we can use an underscore to package name instead of camel case notation
https://docs.oracle.com/javase/tutorial/java/package/namingpkgs.html
Value vs Data Lombok annotation:
The big difference between @Value and @Data annotation is that @Value is mainly used to create immutable objects. @Value is a also an all-in-one annotation that combines: @Getter, @AllArgsConstructor, @ToString and @EqualsAndHashCode and @FieldDefaults(makeFinal = true, level = AccessLevel. PRIVATE)
https://medium.com/consulner/lombok-tricks-and-common-mistakes-fbf0ed044c3c