Answer the question
In order to leave comments, you need to log in
What should I do if I get an error when trying to create a variable in Java?
I want to write a program for displaying variables on the screen, I create a variable with char and integer data types, and I get this error: The value of the local variable sym is not used
.
Answer the question
In order to leave comments, you need to log in
This is not an error, but a warning.
IDE errors are usually underlined in red, warnings in yellow (at least in IDEA this is the case, the screenshot is similar to IDEA, but I'm not sure).
Actually the warning text also says that the variable is not used anywhere.
The warning has no effect on the compilation and operation of the program, its only purpose is to draw the programmer's attention to this code fragment in which he may have made a mistake (forgot to use a variable in the right place or forgot to remove a more unnecessary variable).
The warning will disappear when you finish the snippet.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question