Answer the question

Answer the question

by Md Assaduzzaman -
Number of replies: 9

1, What is arraylist?

2. Write down the difference between arraylist and list

In reply to Md Assaduzzaman

Re: Answer the question

by Mahmudur Rahman -
Answer to question number -1:
The array list class is a convertible array, the difference between a built-in array and an array list in Java is that if you want to add or remove elements from an array, you have to create a new one.
Answer to question number -2:
Array list -
i-ArrayList is a standard submission class.
ii-ArrayList Implements the abstract list extension and list interface.
iii-ArrayList is used to create a dynamic array that contains objects.
List-
i-list is an interface
ii- These elements are used to make a list of objects which are related to their index number.
iii-Syntex is: List of interfaces
In reply to Md Assaduzzaman

Re: Answer the question

by Saif Mahamud Niloy -
1. An array list class is a resizable array. It creates a dynamic array of objects that increases or reduces in size whenever required.

2. The differences between array list and list are given below-
(i) Array list is a standard collection class but list is an interface.
(ii) Array list extends abstractList and implements list interface whereas list interface
extends collection framework.
(iii) Array list used to create a dynamic array that contains objects. On the other hand list
used to create a list off elements which are associated with heir index number.
In reply to Md Assaduzzaman

Re: Answer the question

by Akash das -
Answer to question number -1:
The array list class is a convertible array, the difference between a built-in array and an array list in Java is that if you want to add or remove elements from an array, you have to create a new one.
Answer to question number -2:
Array list -
i-ArrayList is a standard submission class.
ii-ArrayList Implements the abstract list extension and list interface.
iii-ArrayList is used to create a dynamic array that contains objects.
List-
i-list is an interface
ii- These elements are used to make a list of objects which are related to their index number.
iii-Syntex is: List of interfaces
In reply to Md Assaduzzaman

Re: Answer the question

by Mufty _ -
1.Array List is dynamic arrays in Java.

2.
a) List is an Interface.
But ArrayList is a standard Collection Class.
b)List interface extends Collection Framework.
But ArrayList extends AbstractList and implements List Interface.
c)It is used to create a list of elements (objects) which are associated with their index numbers.
But ArrayList is used to create a dynamic array that contains objects.
In reply to Md Assaduzzaman

Re: Answer the question

by Rukya Islam -
1)The ArrayList class is a resizable array, which can be found in the java.util package. The difference between a built-in array and an ArrayList in Java, is that the size of an array cannot be modified (if you want to add or remove elements to/from an array, you have to create a new one)ArrayList is a part of collection framework and is present in java.util package. It provides us with dynamic arrays in Java. Though, it may be slower than standard arrays but can be helpful in programs where lots of manipulation in the array is needed. This class is found in java.util package.
2)ArrayList class is used to create a dynamic array that contains objects. List interface creates a collection of elements that are stored in a sequence and they are identified and accessed using the index. ArrayList creates an array of objects where the array can grow dynamically
In reply to Md Assaduzzaman

Re: Answer the question

by Mehedi Hasan -
Answer to question number -1:
The array list class is a convertible array, the difference between a built-in array and an array list in Java is that if you want to add or remove elements from an array, you have to create a new one.
Answer to question number -2:
Array list -
i-ArrayList is a standard submission class.
ii-ArrayList Implements the abstract list extension and list interface.
iii-ArrayList is used to create a dynamic array that contains objects.
List-
i-list is an interface
ii- These elements are used to make a list of objects which are related to their index number.
iii-Syntex is: List of interfaces
In reply to Md Assaduzzaman

Re: Answer the question

by Jamirul Islam -
1. An array list class is a resizable array. It creates a dynamic array of objects that increases or reduces in size whenever required.

2. The differences between array list and list are given below-
(i) Array list is a standard collection class but list is an interface.
(ii) Array list extends abstractList and implements list interface whereas list interface
extends collection framework.
(iii) Array list used to create a dynamic array that contains objects. On the other hand list
used to create a list off elements which are associated with heir index number.
In reply to Md Assaduzzaman

Re: Answer the question

by Md. Inzamamul Haque -
1. The arraylist class is a resizable array, which can be found in the java.util package.

2. Difference between arraylist and list:
Arraylist: 1. ArrayList is a Class.
2. ArrayList can be instantiated.
3. ArrayList class is used to create a dynamic array that contains objects.
List: 1. List is an Interface.
2. List cannot be instantiated.
3. List interface is used to create a list of elements which are associated with their index numbers.
In reply to Md Assaduzzaman

Re: Answer the question

by Sadid Ahmed -
1.Ans: The array list class is a convertible array, the difference between a built-in array and an array list in Java is that if you want to add or remove elements from an array, you have to create a new one.
2.Ans: Array list -
i-ArrayList is a standard submission class.
ii-ArrayList Implements the abstract list extension and list interface.
iii-ArrayList is used to create a dynamic array that contains objects.
List-
i-list is an interface
ii- These elements are used to make a list of objects which are related to their index number.
iii-Syntex is: List of interfaces