对于不推荐使用的方法意味着什么? [英] What does it mean for a method to be deprecated?

查看:122
本文介绍了对于不推荐使用的方法意味着什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

很多线程都在谈论弃用的含义,但不是对方法意味着什么。有人可以解释一下吗?

A lot of threads talking about what deprecated means but not what it means for a method. Could someone please explain?

推荐答案

根据 Java文档


带注释的程序元素@Deprecated是程序员不鼓励使用的,因为它很危险,或者因为
a更好的替代品存在。

A program element annotated @Deprecated is one that programmers are discouraged from using, typically because it is dangerous, or because a better alternative exists.

基本上,您仍然可以使用它,但有一个更安全的&现在更好的方法。

Basically, you can still use it but there is a safer & better way to do it now.

这篇关于对于不推荐使用的方法意味着什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆