Similarities between an array and an ArrayList - Java

What are the similarities between an array and an ArrayList?

The following are the similarities between an array and an ArrayList:

- Both array and ArrayList can have duplicate elements in them.
- Both are unordered lists.
- Both uses index to refer to their elements.
- Both supports null values
Can we decide a session bean as stateless or stateful without seeing jar file?
A bean can be determined whether is a stateless or stateful by analyzing the deployment descriptor ejb-jar.xml...
What is non static block in java?
The non-static block code is executed when a new class is instantiated. It executes before the constructor’s execution...
Explain how to sort the elements in HashMap - Java
The elements of HashMap can be sorted by using the static method Collections.sort()...
Post your comment