0
0

java でローカル変数に値を代入しているのに、使用されていないと怒られる

Posted at

現象

こんな感じ(testに値を入れているし、使用してるやん…)
※ワーニングは出るけど、代入された値そのものは認識する
image.png

原因(解決)

代入だけだと使ったうちに入らないらしい
変数を何かしら使うことで、エラーは消える
image.png

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0