Connect with one of the following accounts


Please wait while we redirect...

Views: 391   

Java9 enhanced @Deprecated annotation to make you add the version from which the depreciation started and also whether or not that will be removed in future releases. Following example shoes you how to use both of them

public class ClassContainingDeprecatedMethods {

    @Deprecated(since = "1.9", forRemoval = true)
    public void someDeprecatedMethod() {


In the following example the method someDeprecatedMethod() is deprecated from version 1.9 and that will be removed in future releases.

On By

Top Tutorials

Top Questions

Top Articles

Top Blogs

Top News