public static void main(String[] args) {
int[] res = {1,2,5,6,7,8,9,3,10,11,12,14,15,22,21,17,86,99,55,24,23,25,28,31,65};
int length = res.length;
int j = 25;
for (int i = 0; i < length; i++) {
if(res[i] == j) {
System.out.println("位于数组:" + i);
}
}
}
温馨提示:答案为网友推荐,仅供参考