Ive foll code snippet
class A{
private int num;
public ArrayList<Integer> totRecords ;
public final int getNum(){
return num;
}
public final void setNum(int val){
num = val;
}
// inside main
{
A a = new A();
a.setNum(1);
a.totRecords.add(0);
// i use javabeans serialisation.
但是,arrylist没有被序列化。有人可以帮忙吗? 是因为arraylist没有getter-settter
或者公共成员是否无法序列化?