fork download
  1. public static int[] sortIntArray(int [] array){// sorts int array
  2. int temp= 0;
  3. for (int oL= array.length-1; oL>=0; oL--){
  4. int max = 0,index= 0;
  5. for(int iL = oL; iL>=0; iL--){
  6. if(array[iL]> max) {
  7. max = array[iL];
  8. index = iL;
  9. }
  10. }
  11. if(array[oL] < max){
  12. temp = array[index];
  13. array[index] = array[oL];
  14. array[oL] = temp;
  15. }
  16. }
  17. return array;
  18. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:1: error: class, interface, or enum expected
public static int[] sortIntArray(int [] array){// sorts int array
              ^
Main.java:3: error: class, interface, or enum expected
		for (int oL= array.length-1; oL>=0; oL--){
		^
Main.java:3: error: class, interface, or enum expected
		for (int oL= array.length-1; oL>=0; oL--){
		                             ^
Main.java:3: error: class, interface, or enum expected
		for (int oL= array.length-1; oL>=0; oL--){
		                                    ^
Main.java:5: error: class, interface, or enum expected
			for(int iL = oL; iL>=0; iL--){
			^
Main.java:5: error: class, interface, or enum expected
			for(int iL = oL; iL>=0; iL--){
			                 ^
Main.java:5: error: class, interface, or enum expected
			for(int iL = oL; iL>=0; iL--){
			                        ^
Main.java:8: error: class, interface, or enum expected
					index = iL;
					^
Main.java:9: error: class, interface, or enum expected
				}
				^
Main.java:13: error: class, interface, or enum expected
				array[index] = array[oL];
				^
Main.java:14: error: class, interface, or enum expected
				array[oL] = temp;
				^
Main.java:15: error: class, interface, or enum expected
			}
			^
Main.java:18: error: class, interface, or enum expected
	}
	^
13 errors
stdout

Standard output is empty