Simple Source Files and Instance Main #Java 24 #coding #IJN

preview_player
Показать описание
Рекомендации по теме
Комментарии
Автор

I still dont know right the language english. I'm learning. The legend, description of the speak, can stay more up for i can to read. Thank you.

eronteofilo
Автор

Add more features like builtin support for json and yaml makes java suitable for small tasks/scripts

ajithkumar-tdhf
Автор

Wow, when you look at the JEP 495 (the features he is talking about), you can easily make script files without any classes and run them!

Example:
We create a file named "Main.java"
> Main.java

We insert some Java code to the file Main.java

String greeting = "Hello, World!";

void main() {
println(greeting); // <- yes, it works
}


We run the command "java Main.java" with with the --enable-preview argument
java --enable-preview Main.java

=> Hello, World!

VOJAKIS
Автор

Will those feature be out of preview on the next LTS?

pipzgutz
Автор

I tried the code example in the Java Playground but it doesn't work. I get a msg to switch to detailed view or to use System.out.print... and it still doesn't work

enminutes
Автор

Will those python fanatics will ever do java vs python hello world again? They are very proud of it 😁

justreza-wh
visit shbcf.ru