What is difference between compatible and incompatible changes in serialization?
Compatible changes
Some modifications that happed in serializable class after serialization (written to flat file / DB) but there is no exception during de-serialization is called compatible change. These are as below
1. Addition of new field.
2. Static field became non-static.
3. Transient field became non-transient
4. New super class added in class hierarchy.
Incompatible changes
Some modifications that happed in serializable class after serialization (written to flat file / DB) and there is an exception during de-serialization due to the changes is called incompatible change. These are as below
1. Delete existing field.
2. Non-static field became static.
3. Non-transient field became transient
4. Any super class removed in class hierarchy.
5. Field data type changed.
| Is This Answer Correct ? | 1 Yes | 0 No |
Is main a keyword in java?
What is the difference between length and length () in java?
What is the difference between logical data independence and physical data independence?
How many types of memory areas are allocated by jvm?
please tell me what is wrapper class in java with example ?
What are dot operator queries?
What will be the output of the program? public class Test { public static void main(String args[]) { ArrayList<String> list = new ArrayList<String>(); list.add("2"); list.add("3"); list.add("4"); list.add("5"); System.out.println("size :"+list.size()); for(int i=0;i<list.size();i++) { list.remove(i); } System.out.println("size after:"+list.size()); } }
List the interfaces which extends collection interface?
What is broken and continue statement?
what is Inheritense
How will you create the class for the following scenario? Employees under one employee?
Explain the difference between intermediate and terminal operations in java8?