Home / DeveloperSection / Interviews / What are wrapper classes?
You haven’t finished your post yet. Are you sure you want to leave and discard your draft?
Can you answer this question?
Hemant Patel
There are several advantages and disadvantages of the array in java. Advantages and Disadvantages of Array in Java are as follows:
Advantages of the array in Java:
1. In Java, we can able to access any element randomly by using index number provided by arrays.
2. In Array, we can store many numbers of elements at a time.
3. It's fast because primitive type to wrapper classes object conversion will not happen in Array.
Disadvantages of the array in Java:
1. In Java, Arrays are Strongly Typed.
2. In Array, we can't able to add or remove methods.
3. The array having a fixed length, we need to initialize the size of the array.
4. Due to a fixed length, there is a chance of memory wastage.
5. When we want to delete an element in the array we need to traverse throughout the array so this will reduce performance.
Anonymous User
You have need login or register for voting of answers or question.
Hemant Patel
26-Dec-2017There are several advantages and disadvantages of the array in java. Advantages and Disadvantages of Array in Java are as follows:
Advantages of the array in Java:
1. In Java, we can able to access any element randomly by using index number provided by arrays.
2. In Array, we can store many numbers of elements at a time.
3. It's fast because primitive type to wrapper classes object conversion will not happen in Array.
Disadvantages of the array in Java:
1. In Java, Arrays are Strongly Typed.
2. In Array, we can't able to add or remove methods.
3. The array having a fixed length, we need to initialize the size of the array.
4. Due to a fixed length, there is a chance of memory wastage.
5. When we want to delete an element in the array we need to traverse throughout the array so this will reduce performance.
Anonymous User
01-May-2015