Rosetta Code:Village Pump/Example ordering: Difference between revisions

FWIW...
(Moved from duplicate topic)
(FWIW...)
 
Line 20:
I guess that the best order is C# before C++, and F# before Factor. What is the best order? --[[User:Kernigh|Kernigh]] 18:06, 10 May 2011 (UTC)
:I think it should be C, C#, C++, Chef,... and F#, Factor, Fortran, ... --[[User:Mwn3d|Mwn3d]] 18:13, 10 May 2011 (UTC)
:For what it's worth, I wrote this quick little Java program:
:<lang java5>public static void main(String[] args) {
List<String> list= Arrays.asList("C","C++","C#","Chef", "C@", "C@q");
Collections.sort(list);
System.out.println(list);
}</lang>
:and it gave me this:
:<pre>[C, C#, C++, C@, C@q, Chef]</pre>
:I don't think Java does anything weird, so that will probably be what most other automatic, ASCII sorts do. --[[User:Mwn3d|Mwn3d]] 19:55, 10 May 2011 (UTC)
Anonymous user