Records In Java - Full Tutorial - The Best New Java Feature You're Not Using

Records In Java - Full Tutorial - The Best New Java Feature You're Not Using

Coding with John

2 года назад

239,586 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Momen Rashad
Momen Rashad - 22.09.2023 00:04

thanks

Ответить
CCF_100
CCF_100 - 18.09.2023 00:57

Why is my Java professor not teaching this?!

Ответить
Michael O'Connor
Michael O'Connor - 18.08.2023 10:46

This video reminds me so much of the mCoding video on python Data classes!

Ответить
Rick Hunter
Rick Hunter - 13.08.2023 01:21

DOES RECORD WORK WITH SPRING BOOT?

Ответить
curio
curio - 10.08.2023 14:06

Records are a stupid implementation. Enough said

Ответить
Ильяс Маметов
Ильяс Маметов - 08.08.2023 06:12

It would've been even better if record implemented builder pattern. When you have a lot of fields, working with all feilds constructor looks like antipattern

Ответить
Zino Zino
Zino Zino - 08.08.2023 03:29

Very well explained. Thank you kindly.

Ответить
Zino Zino
Zino Zino - 07.08.2023 22:30

Great video! Question please: How did you generate the toString method quickly without the IDE generation tool?

Ответить
The Hint
The Hint - 06.08.2023 23:12

Interesting but when i look at it my classes often have some value which can change. Consider putting employee address in the employee record but people can move. People can even change their names.

Ответить
mohammad sadegh sheikh zahedi
mohammad sadegh sheikh zahedi - 02.08.2023 21:31

You are perfect 👌

Ответить
MJ
MJ - 26.07.2023 05:25

If you suffered from writing POJO classes throughout the years then you will appreciate Records and what they can do for you? Cuts down on lots of redundant boilerplate code...

Ответить
koon aguero
koon aguero - 25.07.2023 17:16

Can we use records as a DTO that will be mapped when a request comes in?

Ответить
4w0ken
4w0ken - 24.07.2023 00:20

Java at this point feels like 40 year old man that tries to stay young by adding cool new stuff to its life. Good content tho :D

Ответить
Morten Slott Hansen
Morten Slott Hansen - 22.07.2023 22:42

Nice and precise explanation without any fuzz 🎉

Ответить
Luis Daniel Sierra Corredera
Luis Daniel Sierra Corredera - 17.07.2023 06:00

Thanks you, could you make a tuto about permits keywords?

Ответить
Hasan Nassar
Hasan Nassar - 11.07.2023 15:46

creative bor👍👍

Ответить
Hypenage
Hypenage - 10.07.2023 06:43

It is basically a Kotlin Data class for anyone wondering what Kotlin’s equivalent is before watching

Ответить
Mehraj Malik
Mehraj Malik - 07.07.2023 21:10

That's a really good teaching... Thanks 🎉

Ответить
Daniel Sabag
Daniel Sabag - 05.07.2023 07:30

Hi great video.
we use lombok a lot in our projects and the record seems less efficient in comparison. I am wondering what you guys think about it.

Ответить
Poojan
Poojan - 01.07.2023 18:28

I check out ur course... But as a Indian citizen I found it some what expensive..😅

Ответить
Дмитрий
Дмитрий - 01.07.2023 15:39

Thank you brother!

Ответить
ROSS DUNNE
ROSS DUNNE - 30.06.2023 13:26

@Lombok has entered the chat.

Ответить
hanzo2001
hanzo2001 - 26.06.2023 14:41

Kotlin data class...

Ответить
Raouf Ben Abdelwahed
Raouf Ben Abdelwahed - 26.06.2023 13:58

well explained as usual !

Ответить
dj pharaoh of time
dj pharaoh of time - 24.06.2023 13:39

Interesting feature well explained thank you.

Ответить
Faiz Quazi
Faiz Quazi - 15.06.2023 08:07

Can we use records in spring data jpa for data crud operations?

Ответить
HBFL3X
HBFL3X - 12.06.2023 01:57

Very informative 👏

Ответить
CaptainLian
CaptainLian - 11.06.2023 21:12

I find it weird that properties of a record is still private.
Since it's `final`, shouldn't it be okay to just have the properties public instead of retrieving its value through a function? Would look way cleaner too.

Ответить
Nidvoraich
Nidvoraich - 02.06.2023 19:11

Thanks you!!

Ответить
Mr. McYeet
Mr. McYeet - 23.05.2023 11:46

Huh, isn't this just a kotlin data class?

Ответить
Source Code
Source Code - 22.05.2023 15:03

Equivalent to a 'data class' in Kotlin.

Ответить
Francis Seidel
Francis Seidel - 15.05.2023 18:58

The more important implements would be the Comparable interface to ensure a compareTo method for sorting.

Ответить
Francis Seidel
Francis Seidel - 15.05.2023 18:53

Adding records to Java, takes me back to the 1980s.

Ответить
Mr. Brackets
Mr. Brackets - 15.05.2023 18:46

great video, thank you!

Ответить
Iamreddit123
Iamreddit123 - 14.05.2023 21:26

why didn't my cs teacher tell me about this

Ответить
Rajesh Lohar
Rajesh Lohar - 11.05.2023 14:19

what if we have more number of fields in data class lets say 100 fields, in that case records looks very bad ....what is your input?

Ответить
Arturs Erglis
Arturs Erglis - 09.05.2023 21:17

For what purpose someone will need the object full of constants? For me it sounds a bit useless?

Ответить
Андрей Шуньгин
Андрей Шуньгин - 03.05.2023 17:46

Thanks a bunch

Ответить
Netify
Netify - 27.04.2023 16:34

Very useful.

Ответить
Moumen Negm
Moumen Negm - 23.04.2023 20:26

is it possible to overload the constructor with less parameters like public E (String name) {…}?

Ответить
Akhil Panwar
Akhil Panwar - 20.04.2023 00:04

cool

Ответить
Andrey Li
Andrey Li - 10.04.2023 15:27

Doesn't name.toUpperCase() mutate final name field?

Ответить
Gizmo Spike
Gizmo Spike - 30.03.2023 12:49

Hello john , can you please make a video on Heap sort ?

Ответить
عايد الناطور
عايد الناطور - 16.03.2023 01:06

Beautiful video 💚 thank you 😊

Ответить
Diego Miglino
Diego Miglino - 08.03.2023 21:59

awesome!

Ответить
oardude
oardude - 01.03.2023 23:39

What happens if you have a telephone field? Telephone numbers change from time to time, would you have to make a regular class instead of a record?

Ответить
Ariel Franco
Ariel Franco - 28.02.2023 22:27

Great tutorial

Ответить
Shane Detsch
Shane Detsch - 18.02.2023 06:21

Records as an entity or json rendering?

Ответить
Steve Shoopak
Steve Shoopak - 10.02.2023 09:43

Guitars 🎸, drums 🥁, and programming. 💻 Yep! You're definitely part of my tribe. Excellent video! Keep it up.

Ответить