gpt4 book ai didi

Java-new实例无法获取静态方法

转载 作者:行者123 更新时间:2023-12-02 10:45:52 25 4
gpt4 key购买 nike

我可以编译

DigestUtils digestUtils = new DigestUtils();
String sign = digestUtils.shaHex(signStr);

之前,但最近,编译器会调用 shaHex 已弃用。

但是,如果我改为直接调用静态方法,编译器就可以了。

String sign = DigestUtils.sha1Hex(signStr);

有谁知道原因吗?

最佳答案

此文档中对此进行了描述:DigestUtils enter image description here

关于Java-new实例无法获取静态方法,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52583996/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com