how to write method for sequential search through array? : <p>I am writing a java method which runs through an array and if a value is present, then it returns the index of the value. It is not compiling, but I don't know what part of my code isn't comprehensive.</p>

<pre><code>import java.util.*;
import static java.lang.System.out;
public class Lab26 {
    public static void main(String[] args) {
    }
    public static int simpleSearch(int[] nums, int value) {
        int nul = 0;
        for (int i = 0; i &lt; nums.length; i++) {
            if (nums[i] == value) {
                return i;
            }
        }
    }
}
</code></pre>
