gpt4 book ai didi

java - 如何删除警告 The serializable class ClASSNAME does not declare a static final serialVersionUID field of type long

转载 作者:太空狗 更新时间:2023-10-29 22:42:42 25 4
gpt4 key购买 nike

<分区>

我创建了一个扩展 Exception 类的类,我在 Eclipse 上收到了这个警告

The serializable class PhoneAlreadyExists does not declare a static final serialVersionUID field of type long

请问如何删除它?

public class PhoneAlreadyExists extends Exception {
public PhoneAlreadyExists() {
// TODO Auto-generated constructor stub
super();
}

PhoneAlreadyExists(String message) {
super(message);
}

}

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