本文介绍了贬低细节......的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用或覆盖已弃用的API。 -------这是编译java程序时显示的消息,应该怎么做才能避免这种情况???

Uses or overrides a deprecated API. ------- This is the message shown while compiling java program and what should be done to avoid this ???

推荐答案



这意味着您正在使用的某个类或方法已替换为另一个(希望更好)替代方案。原件仍然可以正常工作。要获取完整的详细信息,请使用-Xlint选项编译程序,该选项启用警告消息。如果你转到有关类的java文档,它将告诉你什么已经取代它。

it means that one of the classes or methods you are useing has been replaced with a another (one hopes better) alternative. The original should still work OK. To get full details compile the program with the -Xlint option which enables warning messages. If you go to the java documentation on the class in question it will tell you what has replaced it.




如果没有其他错误,代码将运行良好,但使用弃用代码是非常糟糕的做法。

The code will run fine if it has no other errors but it is very bad practice to use deprecated code.



这篇关于贬低细节......的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-12 06:20