Shubham Rai wrote:Is there any way to find present capacity of ArrayList?
And by the way, the short answer to your question is no, the ArrayList class does not provide any method that will allow you to query the current capacity. As mentioned already earlier, the best you can do is to call
ensureCapacity() to set the minimum capacity.