If I serialize this object and then again deserialize and get object what will be value of classCounter?
I created 5 object classCounter = 5 what I will get in new object ?
Public Counter implements serializable {
private static classCounter = 0;
Counter (){
classCounter ++;
}
}
Well it will not affect the counter at all. More over if you transfer serialized data to jvm with different classloader it may occur that counter is less then 5.