src/Recursion/recursion2.java
public static int first_index(int[] arr, int item, int i) {

		if (i == arr.length) {
			return -1;
		}

		if (arr[i] == item) {
			return i;
		}

		return first_index(arr, item, i + 1);

	}
//	first index of an element in array
first index of an element in array
first index of an element in array
public static int first_index(int[] arr, int item, int i) {
		if (i == arr.length) {
			return -1;
		}
		if (arr[i] == item) {
			return i;
		}
		return first_index(arr, item, i + 1);
	}
public static int first_index ( int [ ] arr , int item , int i ) { if ( i == arr . length ) { return - 1 ; } if ( arr [ i ] == item ) { return i ; } return first_index ( arr , item , i + 1 ) ; }
first index of an element in array
first index of an element in array