EG
public class SomeObject implements Serializable {
private static final long serialVersionUID = -5394297791806714290L;
private long m_id;
private String m_name;
private String m_blah;
}
你如何阻止m_blah被序列化?
答案 0 :(得分:2)
使用transient
m_blah
关键字