Esempio

public static void main( String[] args ){
Object lock = new Object();

for ( int i = 0; i < args.length; i++ ) {
synchronized ( lock ) {
System.out.println( args[ i ] );
}
}
}

Soluzione
Spostare i blocchi sincronizzati esternamente al loop.

public static void main( String[] args ){
Object lock = new Object();

synchronized ( lock ) {
for ( int i = 0; i < args.length; i++ ) {
System.out.println( args[ i ] );
}
}
}