Search code examples
javaarrayslistoverriding

arrayList grow method JAVA overriding that function


please can someone explain to me how to override grow function? I mean the size is grow by old capacity - new capacity /2 +1(for exapmle, Array list collection). How to change that by overridin manually. I tried but couldnt do it. Thank for any help


Solution

  • ArrayList is specifically designed not to let you do this. You can't.