Java Questionnaire.

Java Questionnaire.

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

https://medium.com/1developer/spring-requestparam-vs-queryparam-vs-pathvariable-vs-pathparam-7c5655e541ad

Java Package naming convention

Domain NamePackage Name Prefix
hyphenated-name.example.orgorg.example.hyphenated_name
example.intint_.example
123name.example.comcom.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

https://www.baeldung.com/intro-to-project-lombok