Difference between array and arraylist.

Answer Posted / chinnu

Array:arrays is not for our requirement once we create a size next we cant change the size.in advance we cant estimate the size.its taking only homogeneous elements.


Array list:array list is same as collections and vectors.array list is or requirement we can change the size in advance also and estimate the size.its taking both homogeneous and heterogeneous elements .

Is This Answer Correct ?    4 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is abstract class? Explain

589


What is floor in java?

550


Which access specifier can be used with class ?

526


What is the static block?

578


Write a method to check if input string is palindrome?

575






Explain the importance of import keyword in java?

515


What do you mean by inner class in java? Explain

580


How many characters is 16 bytes?

531


How many bits is a word?

554


What are the advantages of arraylist over arrays?

557


In how many ways we can create threads in java?

620


What is the difference between actual and formal parameters?

503


What is jar?

625


Write a program to check string is palindrome without using loop?

561


What is the difference between exception and error in java?

486