Deprecated API

Question:
When I compile my applets or applications, the compiler often tells me I’d use a “deprecated API” and that I should recompile with the option “-deprecate”. If I do so, the warning does not appear any more, but I haven’t noticed a difference in the behavior of the applications and applets, respectively. What does it mean when the compiler warns me that I have a “deprecated API”?

Answer:
A deprecated API is a set of methods or classes that have either beensuperseded by new ones or that have simply been discontinued.Deprecated API’s may or may not be supported in future versions ofJava, but will most likely be phased out. The compiler warns youabout the deprecation so that you may gradually update your code touse new API’s. Otherwise your code may not work with a future versionof Java that completely eliminates the deprecated API’s.

The idea behind deprecating an API is to give programmers a chance toupdate their code rather than catch them off guard and force them todo so immediately. Although we have yet to see how Sun is going tohandle deprecation, the implication is that when an API is to bediscontinued it will first become deprecated. Then in the next majorrelease after deprecation it will be completely eliminated.

Share the Post:
Share on facebook
Share on twitter
Share on linkedin

Overview

The Latest

iOS app development

The Future of iOS App Development: Trends to Watch

When it launched in 2008, the Apple App Store only had 500 apps available. By the first quarter of 2022, the store had about 2.18 million iOS-exclusive apps. Average monthly app releases for the platform reached 34,000 in the first half of 2022, indicating rapid growth in iOS app development.

microsoft careers

Top Careers at Microsoft

Microsoft has gained its position as one of the top companies in the world, and Microsoft careers are flourishing. This multinational company is efficiently developing popular software and computers with other consumer electronics. It is a dream come true for so many people to acquire a high paid, high-prestige job

your company's audio

4 Areas of Your Company Where Your Audio Really Matters

Your company probably relies on audio more than you realize. Whether you’re creating a spoken text message to a colleague or giving a speech, you want your audio to shine. Otherwise, you could cause avoidable friction points and potentially hurt your brand reputation. For example, let’s say you create a