aports/community/openjdk8-corretto/Example.java
Celeste abc39eddbf community/openjdk8-corretto: new aport
https://github.com/corretto/corretto-8
Amazon's no-cost, multi-platform, production-ready distribution of OpenJDK 8

This aport can be cross-compiled with the same method used
for openjdk11/17/21, unlike community/openjdk8 (icedtea).
2024-09-10 03:20:26 +00:00

17 lines
490 B
Java

// Copied from https://www.graalvm.org/22.0/reference-manual/native-image/.
public class Example {
public static void main(String[] args) {
String str = "Native Image is awesome";
String reversed = reverseString(str);
System.out.println("The reversed string is: " + reversed);
}
public static String reverseString(String str) {
if (str.isEmpty())
return str;
return reverseString(str.substring(1)) + str.charAt(0);
}
}