mehdi shahdoost
mehdi shahdoost

Reputation: 1489

is not a known variable in the current context

i have big problem with debugging Java Project on Netbeans [6.9 and 7] , in debugging mode when put mouse cursor on variable get this message : ... is not a known variable in the current context. do you have idea for solve this problem on netbeans ?

Upvotes: 8

Views: 15351

Answers (2)

Variables must be instantiated as null at the start of the method or program (either local or global). This type of problem arises when variables are declared "in the middle of the code" and are detected by the JAVA garbage collector.

Upvotes: 2

It means that the code you have executed so far has not defined the variable yet. Press F7 a couple more times until the code defining the variable is executed.

Upvotes: 2

Related Questions