第二个循环for(int j = i + 1; j < num.length; i++) 这里是不是有问题? j是个定值,在满足 j < num.length 的时候 i 会一直增加,导致数组 out of range。