filmov
tv
Java Explained: 'JEP 445: Unnamed Classes and Instance Main Methods'

Показать описание
In this video I explain one of the new features in Java 21, “JEP 445: Unnamed Classes and Instance Main Methods”. But to explain this in detail, I also need to explain “JEP 330: Launch Single-File Source-Code Programs” and introduce JBang and SDKMAN…
With Java 21 you can reduce a “Hello World” example to a valid Java file with only this code:
void main() {
}
And because it’s a preview feature, it can be executed with this command:
00:00 Introduction of JEP 445
00:45 Blog post by Tom Cools
00:54 JEP 330: Launch Single-File Source-Code Programs
02:55 JEP 330 explained with an example
03:48 The limit of JEP 330 regarding dependencies
04:14 Introducing JBang
04:54 JBang explained with an example
07:20 JEP 445: Unnamed Classes and Instance Main Methods
09:25 JEP 445 discussed in the Foojay Podcast
09:41 Mohamed Taman about the goal of JEP 445
10:16 JEP 445 is not Simon Ritter’s favorite JEP
11:28 According to Piotr Przybyl, JEP 455 helps Java to align with other evolutions
12:26 Introducing SDKMAN
12:53 JEP 445 explained with examples
18:40 Conclusion
With Java 21 you can reduce a “Hello World” example to a valid Java file with only this code:
void main() {
}
And because it’s a preview feature, it can be executed with this command:
00:00 Introduction of JEP 445
00:45 Blog post by Tom Cools
00:54 JEP 330: Launch Single-File Source-Code Programs
02:55 JEP 330 explained with an example
03:48 The limit of JEP 330 regarding dependencies
04:14 Introducing JBang
04:54 JBang explained with an example
07:20 JEP 445: Unnamed Classes and Instance Main Methods
09:25 JEP 445 discussed in the Foojay Podcast
09:41 Mohamed Taman about the goal of JEP 445
10:16 JEP 445 is not Simon Ritter’s favorite JEP
11:28 According to Piotr Przybyl, JEP 455 helps Java to align with other evolutions
12:26 Introducing SDKMAN
12:53 JEP 445 explained with examples
18:40 Conclusion