How Array List can be Serialized.
Answers were Sorted based on User's Feedback
Answer / tirupathi rao
By Default all the Collection classes are serialized.And
Serializable is not a class its an Interface.
| Is This Answer Correct ? | 42 Yes | 4 No |
Answer / ysr
Array list implements Cloneable, Collection, List,
RandomAccess, Serializable
Interfaces. So no need to implement the serialized
interface.
| Is This Answer Correct ? | 21 Yes | 1 No |
Answer / srinu
Arraylist are already implent serializible interface.
| Is This Answer Correct ? | 14 Yes | 0 No |
Answer / javachi
To have serialized array list, we need to implement the serializable interface.
| Is This Answer Correct ? | 6 Yes | 6 No |
Answer / dhaval
there is a method dont remember the name perfectly
though......Collections.synchronizedList(myList)
ArrayList myList = new ArrayList();
Collections.synchronizedList(myList)
| Is This Answer Correct ? | 7 Yes | 14 No |
Answer / kumaraswamy18
It is done by extending Serializiable class
| Is This Answer Correct ? | 9 Yes | 40 No |
Is java written in c?
What is the main difference between java platform and other platforms?
How much ram can a 64 bit processor theoretically?
These static constructors are correct ? class A { statc intA() { } static A(int x,int y) { } static A(int x) { } }
What is the difference between add() and addElement() method in Vector Class ?
What is thread synchronization in java?
Is hashset ordered?
What is Major and importance difference between for and foreach loop ?
What is the += operator called?
ublic class Java_Coding_Samples { public static void JavaHungr(NumberFormatException ae){ System.out.println("integer"); } public static void JavaHungry(Exception e){ System.out.println("string"); } public static void JavaHungry(ArithmeticException ae){ System.out.println("object"); } public static void main(String[] args) { JavaHungry(null); }
How a variable is stored in memory?
How does JAVA ClassLoader work?