Skip to content

Commit 72983ea

Browse files
committed
JEP 477: Implicitly Declared Classes and Instance Main Methods
1 parent 8ff7b90 commit 72983ea

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ This repository contains Java examples that are designed to track and document t
1010
## Specifications & Practices
1111

1212
* [Java 23](java-23/) (September, 2024)
13+
* [JEP 477](java-23/src/main/java/com/ibrahimatay/JEP477ImplicitlyDeclaredClassesAndInstanceMainMethods.java): Implicitly Declared Classes and Instance Main Methods
1314

1415
* [Java 22](java-22/) (March, 2024)
1516
* [JEP 458](java-22/src/main/java/com/ibrahimatay/JEP458LaunchMultiFileSourceCode.java): Launch Multi-File Source-Code Programs
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// JEP 477: Implicitly Declared Classes and Instance Main Methods
2+
// https://openjdk.org/jeps/477
3+
4+
void main() {
5+
System.out.println("Hello, World!");
6+
7+
String name = readln("Please enter your name: ");
8+
print("Pleased to meet you, ");
9+
println(name);
10+
11+
// output:
12+
// Hello, World!
13+
// Please enter your name: İbrahim
14+
// Pleased to meet you, İbrahim
15+
}

0 commit comments

Comments
 (0)