class Solution {
public int solution(String before, String after) {
int answer = 0;
return answer;
}
}
import java.util.Arrays;
class Solution {
public int solution(String before, String after) {
int answer = -1;
char[] be = before.toCharArray();
char[] af = after.toCharArray();
Arrays.sort(be);
Arrays.sort(af);
if (Arrays.equals(be, af)) { // be 와 af 가 같으면
answer = 1;
} else {
answer = 0;
}
return answer;
}
}
Arrays.equals(be, af)