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
Tell me about different OOPS concepts.
Explain different ways of creating a thread. Which one would you prefer and why?
Is java platform independent?
Considering notepad/ie or any other thing as process, what will happen if you start notepad or ie 3 times? Where 3 processes are started or 3 threads are started?
How can we achieve thread safety in java?
What is the use of parseint in java?
What about main() method in java ?
What are keywords in programming?
What is pojo class in java?
Can we rethrow the same exception from catch handler?
What is the size of int in 64-bit jvm?
Can static methods access instance variables in java?
Is null a keyword in java?
What are the differences between c++ and java?
Does set allows null in java?