Home
» Posts filed under
typesafety
June 27, 2021
Ravi Yasas
ArrayList vs LinkedList vs Vector ArrayListLinkedListVectorData structureIndex-based dynamic arrayDoubly linked listGrowable arrayIncrement size50%No initial size100%Traverse Uses iteratorUses iteratorUses enumerationMemory usageLess memory usageMore memory usageAccessibilityRandom...
June 27, 2021
Ravi Yasas
ArrayArrayListFixed-sizeSize is not fixedNot type-safeType-safeAllow both primitives and objectsDoesn't allow primitives. But after Java 5 auto-boxing will convert primitives to objectsType safety means the compiler will validate the types while compiling and throw an error if you do anything...