A: 

Looks okay to me, assuming that your array does not contain null values.

Carlos
no it does not contains null values :P (anyways the main point of the question was the nextLineIsDifferentOrThereIsNoNextLine variable not the comprising)
János Harsányi
+1  A: 

Why don't just iterate it in it's natural order, i mean you don't have to compare it with the next array, just compare it with the previous one.

Garis Suero
+2  A: 

If max_lines is equal to lines_array.length, then it will work perfectly fine. Just add a one-line comment to clarify things (although the name of the variable makes it pretty clear)

current_line + 1 >= maxLines makes sure you don't get an ArrayIndexOutOfBounds.

Perhaps it is worth noting that there must be no null entries in the array, otherwise you risk a NullPointerException. So in order not to clutter your code, you can make a private method:

private boolean itemsDiffer(String current, String next) {
    if (current == null && next == null {
        return false; // or true, if that's your semantics
    } else {
        return current == null || current.equalsIgnoreCase(next);
    }
}

And then have:

boolean nextLineIsDifferentOrThereIsNoNextLine =
     (current_line + 1 >= max_lines) ? true : 
        itemsDifferent(linesArray[current_line], linesArray[current_line + 1];
Bozho
yes, it's equals to lines_array.length
János Harsányi