Difference between array and arraylist.
Answer Posted / vk
Array is a collection of similar data types,ArrayList is not you can store any type of data types in AL.ArrayList will autometically increase 50% of the size which we allocated previously, but Array wasn't.
ArrayList al= new ArrayList();
al.add("a");
al.add(10);
both can be accepted in ArrayList.
| Is This Answer Correct ? | 4 Yes | 1 No |
Post New Answer View All Answers
Which is better singleton or static class?
What about instanceof operator in java?
What is the generic class?
How do you calculate square roots?
What are the restrictions imposed by a Security Manager on Applets?.
What is difference between length and length() method in java ?
What is java autoboxing?
These static constructors are correct ? class A { statc intA() { } static A(int x,int y) { } static A(int x) { } }
Explain the difference between abstraction and encapsulation.
What is compiler and what its output.
Can we catch more than one exception in a single catch block?
What are access specifiers available in java?
What is the difference between variable declaration and variable initialization?
Are primitives objects?
Give few difference between constructor and method?