True or False: One of the differences between an array and ArrayList is that arrays have dynamic length and ArrayList variables have fixed length.
answer is false .. the arrays have dynamic length and arraylist variable have fixed length ,,,
Array : array is the collection of similiar data type or object ... the arrays have the fixed length , which defines compile time ,,,
syntax -
String array[]=new String[5];
ArrayList : is a class of Collections ,, The ArrayList have the dynamic length of size,, and can hold multiple datatypes or object ,,,
ArraytList list=new ArrayList();
hey here i am done ,, i hope your query will clear now.. Please give me a like to appreciate my work and efforts....
Thank You ! Dont forget to like !
Get Answers For Free
Most questions answered within 1 hours.