4 ms·
I thought "modern Java" means classless ? Why do i need to put some code inside another superficial class here ?
by revskill 4y ago
I thought "modern Java" means classless ?
Why do i need to put some code inside another superficial class here ?
- winrid 4y agoEverything in java is a class, not sure what you mean. Personally, it's nice from an operations perspective. Makes debugging performance problems a lot easier.
- revskill 4y agoThen it's "old Java", not "modern java" ?
- mrkeen 4y ago> I thought "modern Java" means classless ? Nope. > Why do i need to put some code inside another superficial class here ? Which class is the superficial class?
- hibbelig 4y agoAre you thinking of JavaScript? In Java you can’t even write hello world without a class.
- vips7L 4y agoSoon you will: https://openjdk.org/jeps/8302326 https://openjdk.org/jeps/8302326
- dgb23 4y agoAre you thinking of records?
- re-thc 4y agoIt's still a class :p
- int_19h 4y agoOnly if by "modern Java" you mean Kotlin. C# has top-level functions and even top-level code these days, but it evolves a lot faster.
- bzzzt 4y ago"Modern Java" is not formally defined, but most people seem to associate it with Java for Microservices (small runtimes instead of ancient Java EE), functional programming, streams, reactive programming and generally using newer (Java 8+) language constructs. There's a lot more to it than obsessing over a single line of boilerplate code...