JAVA中显示已经弃用的divide(BigDecimal divisor, int scale, int roundingMode)应该替换成什么?怎么使用呢

显示已经替换为BigDecimal.divide,具体怎么使用呢
图片说明

图片说明

https://blog.csdn.net/u011627980/article/details/79729270

你用的是jdk多少啊,divide(BigDecimal divisor, int scale, int roundingMode)这个方法竟然废弃了。还有废弃的方法一般在上面的注释里会提示你新的方法是什么

/**
     * Translates a string into {@code x-www-form-urlencoded}
     * format. This method uses the platform's default encoding
     * as the encoding scheme to obtain the bytes for unsafe characters.
     *
     * @param   s   {@code String} to be translated.
     * @deprecated The resulting string may vary depending on the platform's
     *             default encoding. Instead, use the encode(String,String)
     *             method to specify the encoding.
     * @return  the translated {@code String}.
     */
    @Deprecated
    public static String encode(String s);

比如上面的有一句 Instead, use the encode(String,String) method to specify the encoding.