hello I was asked that when arithmetic symbols are entered after they were printed ordered by priority, update the code for an error that I do not know but when printing the variables I get null
package sig_ar_ord;
import java.util.Scanner;
public class Sig_ar_ord {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
String[] s_a=new String[8];
String[] sa=new String[8];
String[] s_a_o={"[","]","(",")","*","/","%","+","-"};
int x=0;
String aux;
//0[ 1] 2( 3)
//4* 5/ 6%
//7+ 8-
for (int i = 0; i <4; i++) {
System.out.println("Escribe el signo aritmetico ");
s_a[i]=sc.next();
}
for (int i = 0; i < 4; i++) {
for (int j = 0; j <8; j++) {
if (s_a[i].equals(s_a_o[j])) {
sa[j]=s_a[i];
}
}
}
System.out.println("Los simbolos en orden son:");
for (int i = 0; i <8; i++) {
if(sa[i]!=null) {
System.out.println(sa[i]);
}
}
}
}