Skip to content

Commit

Permalink
Add Java 24 sandbox
Browse files Browse the repository at this point in the history
  • Loading branch information
marchof committed Jun 12, 2024
1 parent d3e4360 commit 9e53e62
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions site/content/jdk/24/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,23 @@ description: Information about Java 24 including documentation links, new APIs,

{{< jdkdetails "24" >}}
{{< /jdkdetails >}}


## Sandbox

Instantly compile and run Java 24 snippets without a local Java installation.

{{< sandbox version="java24" mainclass="Java24" preview="true" >}}
{{< sandboxsource "Java24.java" >}}
import java.lang.reflect.ClassFileFormatVersion;

public class Java24 {

public static void main(String[] args) {
var v = ClassFileFormatVersion.latest();
System.out.printf("Hello Java bytecode version %s!", v.major());
}

}
{{< /sandboxsource >}}
{{< /sandbox >}}

0 comments on commit 9e53e62

Please sign in to comment.