r/java • • Jun 05 '26

Introducing opt-in requirements for Java APIs

https://osmerion.github.io/OptIn/blog/welcome
50 Upvotes

27 comments sorted by

View all comments

Show parent comment

1

u/repeating_bears Jun 08 '26

"tree verification" as in this?

@OptIn(ExperimentalThing.class)
public static void main(String[] args) {
    foo();
}

private static void foo() {
    Foo.experimentalThing();
}