r/learnjava • • Oct 19 '23

Declaring a variable in java.

Hey guys, whenever I declare a variable "a" in java it gets underlined by a yellow squiggle, and shows "the value of local variable a is not used. Is it normal in java, because earlier I used to code in c++ and this is my first time encountering a yellow squiggle.

4 Upvotes

5 comments sorted by

View all comments

2

u/villabianchi Oct 19 '23

This is just an IDE thing. Yellow lines are warnings and won't break your code. An unused variable is probably a mistake.