Java ArrayList (With Examples)
Run Code. Output. Array: Java Python C++ ArrayList: [Java, Python, C++]. In the above program, we first created an array arr of the String type. Notice the expression, Arrays.asList(arr).It's because the ArrayList class implements the List interface. Let's see an example