Reputation: 31
I'm using Eclipse to develop a Java program. But in my program I have some methods in Eclipse which are striked through. What does it mean ?
Upvotes: 2
Views: 3463
Reputation: 11173
All those methods/class which eclipse found start with @Deprecated
annotation is displayed with a strike through.
A method is made deprecated to discourage the user/client of the method not to use it. Because this method might be remover from the later release of the API/package. In this case the there may be an alternative method to use. A good java doc should contains what to use in alternate of the deprecated method.
Upvotes: 1
Reputation: 17568
It is a deprecated method. From the documentation:
A program element annotated @Deprecated is one that programmers are discouraged from using, typically because it is dangerous, or because a better alternative exists.
Upvotes: 0
Reputation: 26
It means that your method are deprecated. You may find another way to do the same thing
Upvotes: 1