http://www.java2novice.com/java-interview-programs/arraylist-implementation/ |
Description: |
Write a program to implement your own ArrayList class. It should contain add(), get(), remove(), size() methods. Use dynamic array logic. It should increase its size when it reaches threshold. |
Code: |
|
Output: |
2 5 1 23 14 New length: 20 Element at Index 5:29 List size: 6 Removing element at index 2: 1 2 5 23 14 29 |