void foo(@Nullable Object obj)
{ ... }
I saw this code. What does @Nullable mean here? Do you mean to put null in the parameter? @Even without Nullable, we can put null in the parameter, right? I don't know what you mean.
java annotations
@Nullable is a clearer indication of whether the method accepts a null value. Writing code in this way helps you analyze in programs such as FindBugs, which generates a warning if you don't check if it's null at the beginning of the method.
© 2024 OneMinuteCode. All rights reserved.