What is the difference between array and arraylist?
what is the difference between arraylist and linkedlist?

Answer Posted / ram

array contain a similar data type and array size is fixed i.e
dynamically its size can't be changed.
but arraylist can store more then one data type and its size
can be changed dynamically.
one major difference is that,array used to store primitive
data type(i.e. int,char etc) while arraylist is used to
store objects.

Is This Answer Correct ?    4 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can you set the applet size?

585


Which is better list or arraylist in java?

500


What is static variable with example?

569


What is meant by string is immutable?

527


What do you mean by global variable?

531






what is the use of bean managed and container managed with example?

1507


What is the preferred size of a component in java programming?

545


What access modifiers can be used for methods?

565


What is meant by method overriding?

549


What is a container in a gui?

554


Which category the java thread do fall in?

575


I don’t want my class to be inherited by any other class. What should I do?

583


What is singleton class in java and how can we make a class singleton?

580


What are the main differences between the java platform and other platforms?

535


Is there any way to find whether software installed in the system is registered by just providing the .exe file? I have tried the following code but its just displaying the directory structure in the registry. Here the code : package com.msi.intaller; import java.util.Iterator; import ca.beq.util.win32.registry.RegistryKey; import ca.beq.util.win32.registry.RootKey; public class RegistryFinder { public static void main(String... args) throws Exception { RegistryKey.initialize(RegistryFinder.class.getResource("jRe gistryKey.dll").getFile()); RegistryKey key = new RegistryKey(RootKey.HKLM, "Software\\ODBC"); for (Iterator subkeys = key.subkeys(); subkeys.hasNext();) { RegistryKey subkey = subkeys.next(); System.out.println(subkey.getName()); // You need to check here if there's anything which matches "Mozilla FireFox". } } }

1357