交叉导入java包 [英] Crossed out imported java packages
问题描述
,但在那里有1或2个包被划掉了。
为什么会发生这种情况?
如何解决这个十字架,使得不交叉?
这些类被标记为 @Deprecated
这意味着编译器建议不要使用它们,因为它们可能会给您带来问题。
注释@Deprecated的程序元素是程序员不要使用
,通常是因为它是危险的,或者因为
a更好的选择存在。编译器在不推荐的程序
元素被使用或覆盖不被废弃的代码时发出警告。
检查javadoc的已弃用的类来检查要使用的类。
In my java program, I have imported some java packages in one class. but in there 1 or 2 packages were crossed out.
Why that happened? How to solve this cross out to make uncrossed?
Those classes are marked as @Deprecated
.
This means that the compiler advises not to use them, because they can bring you problems.
A program element annotated @Deprecated is one that programmers are discouraged from using, typically because it is dangerous, or because a better alternative exists. Compilers warn when a deprecated program element is used or overridden in non-deprecated code.
Check the javadoc(s) of the deprecated classes to check which classes to use instead.
这篇关于交叉导入java包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!