I cannot decide which method is better with consideration of both readability and fault-tolerance.
Object objects = getArrayOfKnownLength(); int i = -1; someMethod(objects[++i], objects[++i], objects[++i], objects[++i]);
Object objects = getArrayOfKnownLength(); someMethod(objects, objects, objects, objects);
I have always done the second method, but there have been several cases where I got IndexOutOfBoundsException because I made some changes which affected the expected array element position. So I have been considering using the first method to prevent this issue. My only concern is that it may be less readable.
I know this is a very minor thing to be questioning, but I am curious what the majority opinion is.