什么是“从未使用过分配值”警告意味着? [英] What does the "Assigned value is never used" warning mean?
本文介绍了什么是“从未使用过分配值”警告意味着?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
unformatted = unformatted.replaceAll(seperator, "\n");
Netbeans给我警告:
Netbeans gives me the warning:
永远不会使用指定的变量
The assigned variable is never used
这是什么意思?
推荐答案
这意味着在为其赋值后,您没有对该变量执行任何操作。例如,您不会返回它,使用它执行计算,将其传递给方法或其他任何内容。它基本上意味着在为其赋值后尚未使用该变量。
It means that you're not doing anything with that variable after you assigned a value to it. For example, you are not returning it, performing a calculation with it, passing it to a method, or anything else. It basically means that the variable has not been used after a value has been assigned to it.
这篇关于什么是“从未使用过分配值”警告意味着?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文