简体   繁体   English

Netbeans 在删除的代码中显示编译错误

[英]Netbeans shows compilation error in removed code

i'm using netbeans IDE.我正在使用 netbeans IDE。 the error was caused due to a variable i created in that method.该错误是由于我在该方法中创建的变量引起的。 but i deleted that method including its variables as you can see.但我删除了该方法,包括它的变量,如您所见。

在此处输入图像描述

i removed that method.我删除了那个方法。 i tried to comment out that line but it still shows error.我试图注释掉那行,但它仍然显示错误。 i'm new and i'll appreciate if you explain what's wrong here or its a bug in my IDE because i haven't seen anything like it before.我是新手,如果您能解释一下这里出了什么问题,或者它是我的 IDE 中的错误,我将不胜感激,因为我以前从未见过类似的东西。 when i hover my cursor on bulb and click it doesn't do or show anything.当我在灯泡上的 hover 我的 cursor 并单击它时,它没有任何作用或显示任何内容。

If we can see the whole code of that class, it would be more helpful to analyze the error.如果我们能看到那个 class 的整个代码,对分析错误会更有帮助。

First thing comes in my mind like these errors is a syntax error.我想到的第一件事就是这些错误是语法错误。 Check that if you mistakenly commented a { or } so that a bracket is opened but didn't closed.检查您是否错误地注释了{}以便括号打开但没有关闭。

Also try to clean the project and build again.还尝试清理项目并再次构建。

Just reopen the file and see if the error is still there.只需重新打开文件,看看错误是否仍然存在。 It can happen that Netbeans does not show you the correct error. Netbeans 可能不会向您显示正确的错误。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM