Introduction On March 16th, 2021, Java 16 was GA. With this new release, tons of new exciting features are added. Check out the release notes to know more about these changes in detail. This article's focus will be on Java Records, which got delivere...

Markdown supported · ⌘↵ to post
Nice article, Ashish!
It is interesting how different Java decompilers reconstruct the code. In your example javap produced a class that just extends java.lang.Record as if it is a good old Java 1.5 code.
But for example this Java decompiler reconstructs code already with a record keyword.
One of the features I like about Scala is the one line entity declaration. I'm working on a project with Java and I miss the one line declaration. Sure, I can use Intellij to generate boilerplate code but I personally do not feel it the same.
With regards to your code, is there any reason you prefer straight sql statements than using a ORM? Hibernate maybe?. I know performance would be one but I'm interested to know in alternatives.
Would you recommend java 16 for a project that would take 3 years to develop given that by that time code most likely be fully supported.
Good post btw.
Thanks.
Deepak A L
Did you fix the error and is it working now correctly?
2021-03-19 02:01:55.434 ERROR 66059 --- [nio-8080-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.example.indianstates.State]: No default constructor found; nested exception is java.lang.NoSuchMethodException: com.example.indianstates.State.<init>()] with root cause