Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我是java新手,我遇到了问题。
我如何在java中关闭这个警告
它说“可序列化的类 hrd1 没有声明 long 类型的静态最终 serialVersionUID 字段”
你可以像这样向你的类添加一个变量:
private static final long serialVersionUID = 1L;
或向您的班级添加 supresswarnings 注释
@SuppressWarnings("serial") public SomeClass {