Java 16: Records - why and how to use ?

preview_player
Показать описание
#java16feature #record #jep395

Records in Java 16 - Why and how to use?
In this, we are going to learn a new feature added in Java 16 which is records.
We will see the motivation behind adding this feature and then how to use it in our code with examples.
_____________________________________________________________________________________
You can find all the demo code here -

_____________________________________________________________________________________

0:00 Overview
0:36 Why records?
3:21 Record classes
5:09 Demo code
____________________________________________________________________________________
Links to tools used in the video:

Рекомендации по теме
Комментарии
Автор

Hey you providing awesome java content it will really helpful.

santhoshkumar
Автор

This looks good, it would be help full, 1. if you add the code for setting the value - since there is no setter method, 2. Invoke super () and override parent properties as well.

dhavasanth
Автор

Good but what if we want to create a empty constructer?

vivekanandasuggu
Автор

I think Java records was introduced in Java 14 and not Java 16

RahulSingh-uyyi