Which annotation marks a method as deprecated?

Java Professional Easy

Java Professional — Easy

Which annotation marks a method as deprecated?

Key points

  • The @Removed, @Legacy, and @Obsolete annotations do not serve the same purpose as @Deprecated.
  • @Deprecated is specifically used to flag methods that should no longer be used.
  • It helps developers identify which methods to avoid in their codebase.

Ready to go further?

Related questions