O'Reilly logo

Java 9 Cookbook by Nick Samoylov, Mohamed Sanaulla

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

How it works...

If we compile the preceding code, there will be a warning this method has been deprecated and marked for removal at every place of its implementation.

If the forRemoval() method is not present or set to false, the warning message would say has been deprecated only.

To avoid the warning, we need to either avoid using the deprecated method or suppress the warning as described earlier.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required