格式化代码

This commit is contained in:
LingZhaoHui 2021-04-30 18:50:10 +08:00
parent d67901837a
commit 1a03be5572

View File

@ -5,9 +5,12 @@ public class SortArray {
public static void main(String[] args) { public static void main(String[] args) {
int[] a = {2, 4, 6, 8, 3, 6, 9, 12}; int[] a = {2, 4, 6, 8, 3, 6, 9, 12};
doSomething(a, 0, a.length - 1); doSomething(a, 0, a.length - 1);
for (int i = 0; i <= a.length - 1; i++) for (int i = 0; i <= a.length - 1; i++) {
System.out.print(a[i] + " "); System.out.print(a[i] + " ");
} }
System.out.println();
}
private static void doSomething(int[] a, int start, int end) { private static void doSomething(int[] a, int start, int end) {
if (start < end) { if (start < end) {