What does strikethrough mean in Netbeans?

Jean-François Corbett picture Jean-François Corbett · Sep 20, 2011 · Viewed 11.6k times · Source

What does it mean when things are written in strikethrough in Netbeans, like getObject in the example below?

enter image description here

Version: Netbeans 6.8

Answer

jefflunt picture jefflunt · Sep 20, 2011

The method has been deprecated (i.e. replaced by a newer method, which you should probably use instead).

In other words, for some backward compatibility, the method you're calling is still in the API, but has been replaced by newer code/methods. Often this happens when an API is redesigned or updated, especially when a given API update changes its fundamental approach to a problem. When that happens, the old way of doing something will be deprecated, and you are therefore encouraged (though not required, so long as your code compiles and runs) to use the new stuff.