Tag: java array methods

Java Arrays class

May 4, 2013 · 1 min read
###### Java Arrays class: Here comes a confusion for a new Java learner with **array**, **array**s and **Arrays**. He uses all interchangeably, meaning the same. He uses anyone just to refer arrays of Java. He thinks array and arrays are singular and plural. Of course, he is right. Problem comes once he knows there is a class in Java called **Arrays**. If you say arrays, I mean you are talking general arrays and if you say Arrays, I mean your are referring [class Arrays](http://way2java.com/collections/class-arrays-api-methods/) (from java.util package).

Sorting array elements sort() Comparator

September 13, 2011 · 1 min read
The earlier **sort()** example sorts implicitly in natural ascending order. The order can be customized with the overloaded sort() method that takes a [Comparator](http://way2java.com/collections/interface-comparator/) object as parameter.