Skip to content

jdk24 diagram #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Core Java Features
This repository contains Java examples that are designed to track and document the progress of Java Enhancement Proposals (JEPs), Java Specification Requests (JSRs), and Java Language Revisions (JLRs). These examples provide a comprehensive overview of the various changes, updates, and improvements made to the Java language and platform over time.

![image](/docs/diagrams/jdk22-diagram.PNG)
![image](/docs/diagrams/jdk24-diagram.PNG)

****Note***: Continuous improvements and bug fixes are made within the repository to produce better solutions.*

Expand Down
Binary file added docs/diagrams/jdk24-diagram.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 27 additions & 0 deletions java-24/src/main/java/JEP492FlexibleConstructorBodies.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
public class JEP492FlexibleConstructorBodies {
public static void main(String[] args) {

}
}

class Person {
private final String name;
private final int age;

Person(String name, int age) {
prologue {
if (name == null || name.isBlank()) {
throw new IllegalArgumentException("Name cannot be empty");
}
if (age < 0) {
throw new IllegalArgumentException("Age cannot be negative");
}
}
this.name = name;
this.age = age;

epilogue {
System.out.println("Person object created: " + name + ", Age: " + age);
}
}
}
Loading