package com.lovcoding.day06;

public class TestArr02_Search01 {

    //查找多个最大值
    public static void main(String[] args) {
        int[] arr = {1,2,5,7,13,67,99,99,23,99};

        //普通查找
        int a = 13;

        //索引
        int index = -1;

        for (int i = 0; i < arr.length; i++) {
            if (a == arr[i]){
                index = i;
                break;
            }
        }

        System.out.println(index);
        System.out.println(arr[index]);
    }
}
