jjzjj

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

coder 2023-08-28 原文

<分区>

我创建了一个扩展 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);
    }

}

有关java - 如何删除警告 The serializable class ClASSNAME does not declare a static final serialVersionUID field of type long的更多相关文章

随机推荐