How and when @Deprecated annotation is used

@Deprecated are majorly used when

1. API is experimental and likely been subjected to incompatible changes,

2.Error is likely to occur from usage of the API

3. API is obsolete

4. API is flawed and is impractical to fix and few more…
The @Deprecated annotation will cause the compiler to emit an error when invoked,
though many IDEs may also highlight this method as deprecated

class ComplexAI {
    public void fastSlowAI() {
// stuff here

    public void quickFastAI() {
// client code should use this instead

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at

Up ↑

%d bloggers like this: