The eclipse error prompt is as follows:
The error code is as follows:
At first, I couldn’t think about it. Later, I found out the cause of the problem. The declaration of variable in Java can not be in the method, but the statement can only appear in the method . The initial value can be assigned when the variable is declared again, but if you want to assign a value separately, it must be written in the method, as shown in the figure below after modification
This is a very elementary knowledge point, but it is easy to be ignored. I hope you can take it as a warning
Shallow knowledge, if there is a mistake, please correct, I am very grateful
Similar Posts:
- Eclipse Error: GC overhead limit exceeded [How to Solve]
- local variables referenced from a Lambda expression must be final or effectively final [Solved]
- Three common ways of react event binding and solution can’t update during an existing state transition (such as within ‘render’)
- When using eclipse to compile projects with JNI, make: * no rule to make target ` all ‘. Stop. Solution appears
- Project interpreter not specified(eclipse+pydev)
- Ubuntu16.04: How to Solve “no java virtual machine was found after searching the following locations:” Error
- Can’t use Subversion command line client: svn.
- Error reporting of importing tensorflow package from pycharm
- Eclipse prompts that unhandled event loop exception is stuck
- Android ADB server didn’t ACK * failed to start d