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 the loop in java?

781


What is the difference between method overriding and overloading?

781


What restrictions are placed on method overriding?

844


These static constructors are correct ? class A { statc intA() { } static A(int x,int y) { } static A(int x) { } }

789


What is synchronization and why is it important in java programming?

683


Is arraylist sorted in java?

704


What is Recursion Function?

856


What is == in java?

750


Write a program to find the whether a number is an Armstrong number or not?

760


How do you square a number in java?

759


What is percentage in java?

740


Explain about public and private access specifiers?

758


What is the use of set in java?

828


What is methods in java?

743


Can constructor be protected in java?

700