How to fix java warning for "The value of the local variable is not used " -
how avoid java warning says
the value of local variable not used
for variable declared private
?
you have multiple choices:
- remove field.
unused, shouldn't there. - comment out field, e.g. using
// todo
temporary hiding of warning until write code using field. - suppress warning using
@suppresswarnings("unused")
. - disable warning in ide settings. eclipse, in
window
>preferences
java
>compiler
>error/warnings
unnecessary code
>unused private member
- select option
ignore
for #3 , #4, though, although can, why want to?
Comments
Post a Comment