Created
November 4, 2015 03:59
-
-
Save mattmccarthy11/1ac0db84f0e5f6f4a751 to your computer and use it in GitHub Desktop.
Revisions
-
mattmccarthy11 revised this gist
Nov 4, 2015 . No changes.There are no files selected for viewing
-
mattmccarthy11 created this gist
Nov 4, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ String[] mystr = {"Jack","Fortran","Amon","Cpp","Phaser"}; for(int i=0;i<mystr.length-1;i++){ for(int j=i+1 ;j<mystr.length;j++){ if( mystr[i].compareTo(mystr[j]) > 0 ){ String tmp = mystr[i]; mystr[i]= mystr[j]; mystr[j]=tmp; } } }