An ArrayList automatically expands as data is added.
Tutorial Details:
java.util.ArrayList allows for expandable arrays, and is the Collections replacement for the older Vector class. An ArrayList has the following advantages over an array:
An ArrayList automatically expands as data is added.
An ArrayList implements the List interface which allows the underlying implementation to be changed without changing code. (needs example).
An ArrayList has methods for inserting, deleting, and searching.
An ArrayList allows use of iterators.
Core Java Interview Questions!
Core Java Interview Questions!
Core Java Interview Questions
Question: What is transient variable?
Answer: Transient variable can't be serialize. For example if a variable is declared as transient in a Serializable class and the class is written