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:

  1. remove field.
    unused, shouldn't there.
  2. comment out field, e.g. using // todo
    temporary hiding of warning until write code using field.
  3. suppress warning using @suppresswarnings("unused").
  4. 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

Popular posts from this blog

sql - VB.NET Operand type clash: date is incompatible with int error -

SVG stroke-linecap doesn't work for circles in Firefox? -

python - TypeError: Scalar value for argument 'color' is not numeric in openCV -