任何機構都可以解決這個問題。ArrayIndex在java中出界byte []
public class Main {
public static void main(String[] args) {
byte[] temp = "smile".getBytes();
byte[] hash = new byte[32];
System.arraycopy(temp, 0, hash, 0, 16);
System.arraycopy(temp, 0, hash, 15, 16);
}
}
你試過打印'temp'數組的長度?另請參閱stacktrace,瞭解產生線路錯誤的原因。 – ersnh