Where do (or would) you put nullability annotation...
# random
g
Where do (or would) you put nullability annotations in Java? (1️⃣)
Copy code
@Notnull
public static String foo() { ... }
(2️⃣)
Copy code
public static @Notnull String foo() { ... }
1️⃣ 13
2️⃣ 1
r
(3️⃣) K
g
@rtsketo, yeah, I would prefer Kotlin to Java too! But I am currently making slides about interop with Java. So I need to write an example involving Java code with the annotations.
b
Both options mean the same thing (return type) so it's just a matter of style/preference.
g
I know. I am literally asking what is the common style and whether there is one at all.
b
Ah, then deffo 1️⃣