Please let me know what's wrong here
package com.codegym.task.task04.task0420;
/*
Sorting three numbers
*/
import java.io.*;
import java.util.*;
public class Solution {
public static void main(String[] args) throws Exception {
//write your code here
int temp;
Scanner sc = new Scanner(System.in);
// n = sc.nextInt();
int [] a = new int[3];
for (int i = 0; i < 3; i++) {
a[i] = sc.nextInt();
System.out.print(a[i] + " ");
}
for (int i = 0; i < 3; i++) {
for (int j = i + 1; j < 3; j++) {
if (a[i] < a[j]) {
temp = a[i];
a[i] = a[j];
a[j] = temp;
}
}
}
System.out.println(" ");
for (int i = 0; i < 3; i ++) {
System.out.print(a[i] + " ");
}
}
}