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

Why do we create public static method in java?

675


What is the current version of java?

639


Is void a keyword in java?

688


What is natural ordering in java?

621


What is difference between array and arraylist in java?

543






What language is pass by reference?

666


How would you convert bytes to string?

656


Can a method be static?

614


What is final keyword in java?

653


What is Java Shutdown Hook?

721


What is multi-catch block in java?

702


Which java version is latest?

611


What are alternatives to java serialization?

689


Is null an object java?

642


Can I learn java without any programming experience?

673