Undocumented JAVA : Arrays - A new look
Introduction Often we have seen developers using arrays. It is a simple data structure that always we can trust and can be implemented very easily. Java has made the handling of the array very simple. Here I am planning to bring in the features like how to optimize the usage of arrays. Need for Arrays We can live with the new generic collection specific to the primitive data types. Still one would argue that the java collection framework is not the only solution for handling collection. I can see a typical process where the size/type of the collection is determined in any problem then the best way to use the collection is 'Arrays'. I am just summarizing the list of static methods in the java.util.Arrays class and with brief description of what the method does. Reference : Java doc 6 Array Manipulation Use the methods inside the utils for better speed optimization to handle collection. Mostly these are tested and proven techniques. Like the 'fill' and 'sort' are...