There is a bug in the sort routine for Gnu ls version 4.5.7. I am using
Mandrake 9.1. To demonstrate the problem:
>mkdir foo
>cd foo
>touch Test.class TestExpression.class TestExpression.java Test.java
>ls -al
total 8
drwxr-xr-x 2 jim jim 4096 May 10 10:36 ./
drwxr-xr-x 72 jim jim 4096 May 10 10:32 ../
-rw-r--r-- 1 jim jim 0 May 10 10:36 Test.class
-rw-r--r-- 1 jim jim 0 May 10 10:36
TestExpression.class
-rw-r--r-- 1 jim jim 0 May 10 10:36
TestExpression.java
-rw-r--r-- 1 jim jim 0 May 10 10:36 Test.java
Note that Test.java doesn't follow Test.class in the sort order.