How to initialize ArrayList in java

We have many ways to initialize ArrayList in java.
ArrayList can be initialized in one line, Using constructors, Using Arrays.

1. Initialize ArrayList using Constructors

2. Initialize ArrayList in One line using Arrays.asList()

3. Initialize ArrayList using Collections (Another List)

4. Initialize ArrayList using InnerClass


1. ArrayList

It's only fair to share...Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn