Which three annotation uses are valid? (Choose three.)
A. Function<String, String> func = (@NonNull x) -> x.toUpperCase();
B. var v = "Hello" + (@Interned) "World"
C. Function<String, String> func = (var @NonNull x) -> x.toUpperCase();
D. Function<String, String> func = (@NonNull var x) -> x.toUpperCase();
E. var myString = (@NonNull String) str;
F. var obj = new @Interned MyObject();
D and E all other with compilation error
I tried the code
D,E,F)
https://docs.oracle.com/javase/tutorial/java/annotations/basics.html
F doesn’t compile !
ACF
DEF
100% correct D and E
all other with compilation error