To search any element present inside the array in Java Programming using linear search technique, you have to use only one for loop to check whether the entered number is found in the list or not as shown in the following program.
Following Java program first ask to the user to enter the array size then it will ask to enter the array elements, then it will finally ask to enter a number to be search in the given array to check whether it is present in the array or not, if it is present then the program will show the position of that number present in the array:
SOURCE CODE ::
OUTPUT ::
need an explanation for this answer? contact us directly to get an explanation for this answer