Exploring the online world is my passion. have experience of #content writing #SEO #Digital Marketing #On-Page #Lead Generation #Content Analyst #Marketing Analyst... I could never stop at one point, continuously wanted to acquire more and more skills. My work for any organization will be full of passion and hard work.
Hemant Patel
27-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. An 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.