Difference between array and arraylist.
Answer Posted / mohammad fazulullah
Array is the object and it stores the object of same type
Eg : Its stores complete integer types or string types
int[] IntArray = new int[3];
string[] StringArray = new StringArray[2];
Arraylist is the collection in which we can store the
objects of any data type.
Eg : Arraylist Arr = new Arraylist()
Arr.Add(13); // Integer Type
Arr.Add(10); // String Type
2 . Arrays has the Fixed Lenght where as the Arraylist
varies the leghth as the objects Added.
Is This Answer Correct ? | 196 Yes | 32 No |
Post New Answer View All Answers
What are the different types of multitasking?
How to use string tokenizer class.
What is a function easy definition?
What is a double vs float?
Which is bigger float or double java?
What is the difference between the paint() and repaint() methods in java programming?
What is singleton class in ruby?
Explain the features of java?
Why enumeration is faster than iterator?
How do you override a method?
What is port number in java?
What is the vector class in java programming?
How finally used under exception handling?
What does file separator do in java?
how can i use a nonsynchronized hashtable?