What's new in Java 15?

  Рет қаралды 5,787

Laur Spilca

Laur Spilca

Күн бұрын

Пікірлер: 33
@omprakashhivre4519
@omprakashhivre4519 4 жыл бұрын
Very good explained 👍
@laurspilca
@laurspilca 4 жыл бұрын
Code on GitHub: github.com/lspil/youtubechannel/tree/master/welcome-java15
@raghuvardhansaripalli9636
@raghuvardhansaripalli9636 4 жыл бұрын
nice video and its a touch up for java 15 new features. Thank you ..god bless you..
@javacoder1986
@javacoder1986 4 жыл бұрын
Thank you for posting this informative video.
@s1mpl3_
@s1mpl3_ 4 жыл бұрын
7:47 even darker joke for the current situation would have been if you called the class Bat instead of Cat
@laurspilca
@laurspilca 4 жыл бұрын
:))
@ahadporkar7355
@ahadporkar7355 4 жыл бұрын
Thank you
@xs2farooq
@xs2farooq 4 жыл бұрын
What are the practical examples / design patterns of local interfaces and local enums?
@laurspilca
@laurspilca 4 жыл бұрын
Good question, Muh. I honestly don't know where and if we'd ever use this. But it's possible this implementation is done as a prerequisite for some new features which will be implemented in next Java versions.
@BinSlayer1
@BinSlayer1 4 жыл бұрын
Hi Laurentiu. I was wondering what your opinion was about sealed classes. I guess to me they look like they have more security, but they seem to completely break DIP and low coupling principles, don't they? Unless I'm missing something I don't see how they can be used in professional coding. I would say they are on the same level as the instanceof operator.
@laurspilca
@laurspilca 4 жыл бұрын
Now they also look like a little bit overengineering to me. But I don't want to make the mistake to say they're not useful yet, or that they might not become a successful feature. Let's see how they'll be embraced in the future by the community. It's hard to say something about a feature you have no experience with. We have to wait for a little and see if it finds a place in the ecosystem.
@vadympylypchenko5801
@vadympylypchenko5801 4 жыл бұрын
In my opinion, the Sealed classes and interfaces can make a big mess in the real project.
@sharifyy
@sharifyy 4 жыл бұрын
Thanks for the video. Doesn't non-sealed keyword violate the whole purpose of sealing a class?
@jakobkmar
@jakobkmar 4 жыл бұрын
Only classes with permission can use non-sealed when inheriting from sealed classes. This way sealed classes can allow implementation for just the classes with permission - now these classes are normal (non-sealed) after having implemented the original sealed class.
@laurspilca
@laurspilca 4 жыл бұрын
@@jakobkmar I think Mohamad means (correct me if I'm wrong) if B extends A and A is sealed, if I make B non-sealed it could be extended by C, but this way C is also an A. So you can write A a = new C() even if A is sealed for B. That's actually an interesting question. I'd like you leave me more time to see how will these new sealed classes evolve before coming with a good answer. Or, in more decent words: I don't know how to answer yet :))
@jakobkmar
@jakobkmar 4 жыл бұрын
@@laurspilca Well B still needs the permission from A. So the developer who writes class A has to think about which classes to give the permission to.
@sharifyy
@sharifyy 4 жыл бұрын
@@laurspilca yes! exactly I mean that.
@jakobkmar
@jakobkmar 4 жыл бұрын
@@laurspilca Wanted to add: You said "you can write A a = new C() even if A is sealed for B" which is wrong, because (sry for writing this the third time) B needs to be listed at the "permits" list in A (and then A is NOT sealed for B). If this is not the case, then "A a = new C()" (actually it fails earlier at B extends A) would not work - so this "problem" does not exist :)
@cinzacaful
@cinzacaful 4 жыл бұрын
Wow...nice video! I am learning C# and C# had "sealed" classes and I am happy to see this in Java. Can we use the generic data structures with the primitive datatypes instead of the generic classes? ex: ArrayList list = new ArrayLis();
@laurspilca
@laurspilca 4 жыл бұрын
In java you cannot use primitives for generic types. At least not yet. But I know some projects already work for this so we might have this possible in future releases.
@cinzacaful
@cinzacaful 4 жыл бұрын
@@laurspilca Thanks for the answer! 🥳
@_dallas_
@_dallas_ 4 жыл бұрын
the intro just made it sound like the video has ended, i got so confused...
@saikrishnakaushik2869
@saikrishnakaushik2869 4 жыл бұрын
lmao
@rey6253
@rey6253 4 жыл бұрын
Oh fck, the sealed classes are horrible on the way how they are implemented. Why would u have to explicitly permit every class to extend it ?! In c# it is much better implemented.
@lowercaseguy3578
@lowercaseguy3578 4 жыл бұрын
pls fix ur audio , the beginning raped my ear!
@laurspilca
@laurspilca 4 жыл бұрын
Hey. Sorry for this. I'll check out what's happening.
All New Java 17 Features in 5 Minutes!
4:47
Keso Rupert
Рет қаралды 85 М.
Enceinte et en Bazard: Les Chroniques du Nettoyage ! 🚽✨
00:21
Two More French
Рет қаралды 42 МЛН
Choosing the right persistence solution for your Java app
48:00
Laur Spilca
Рет қаралды 1,2 М.
Learn Any Programming Language In 3 Hours!
22:37
Code With Huw
Рет қаралды 639 М.
What is FAAS and event-driven architecture?
16:05
Defog Tech
Рет қаралды 28 М.
Новое в JDK 14 (синтаксис)
25:28
letsCode
Рет қаралды 26 М.
What's new in Java 11 | What's new in....?
8:19
Marco Behler
Рет қаралды 36 М.
Java 14 New Features
12:29
Programming Techie
Рет қаралды 22 М.
Generics In Java - Full Simple Tutorial
17:34
Coding with John
Рет қаралды 1,1 МЛН