What happens if you use deprecated methods / functions in Java?

Any problems with using deprecated features in Java? If so, why keep this function? Is it a bad habit to use disapproval methods in Java?

Solution

Some potential problems are:

>Methods may no longer exist (in fact, this has never been the case, but through the official definition, disapproval methods may be eliminated from future Java) > serious programming errors may occur due to the fatal defects of deprecated methods (such as system.runfinalizesonext and its evil dual runtime. Runfinalizesonext). > Data corruption may occur due to an inherently unsafe and deprecated method (such as thread. Stop),

reference resources

> java. sun. com Glossary

>Depredation: refers to a class, interface, constructor, method or field that is no longer recommended and may cease to exist in future versions

> Language guide/How and When to Deprecate APIs > Annotation Type Deprecated API

Related issues

> Is it wrong to use Deprecated methods or classes in Java? > Difference between a Deprecated and Legacy API?

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>