It is not deprecated. The decode method with two parameters is not deprecated. Please check again. The first parameter is the String to decode; the second is the name of the character encoding to use (e.g., "UTF-8").
on the other hand is.
It's not deprecated. The overloaded decode method that doesn't take a character encoding argument is deprecated.