Print length of longest sequence of consecutive numbers
Using static for the consecutive() function is appropriate.  However, the omission of braces, the inconsistent indentation, and lack of spaces between operators is just as bad as before.

Your function crashes on arrays of length 0 or 1.

The variable names f and counter could be improved.  I think that a different looping structure would be clearer as well.

public static int consecutive(int[] array) {
    if (array.length &lt;= 1) {
        return array.length;
    }

    int maxRun = 0;
    for (int i = 1; i &lt; array.length; i++) {
        int thisRun = 1;
        while (i &lt; array.length &amp;&amp; array[i - 1] + 1 == array[i]) {
            thisRun++;
            i++;
        }
        if (maxRun &lt; thisRun) {
            maxRun = thisRun;
        }
    }
    return maxRun;
}