Your task is to sort an array list of path names such as
/home/me/cs1 /usr/share /var/log /usr/local/jdk1.6.0/jre/lib
Sort by the path length, i.e. the number of slashes in the path name. Path names of the same length should be arranged in lexicographic order (i.e. by calling String.compareTo.) For example, the path names given above will be sorted as
/usr/share /var/log /home/me/cs1 /usr/local/jdk1.6.0/jre/lib