Příklad

public static void main( String[] args ) {
List l = new ArrayList(10);
add( args, l );
}

private static void add( String[] args, List l ) {
System.out.println( "Entered print" );
for ( int i = 0; i < args.length; i++ ) {
l.add( args[ i ] );
}
System.out.println( "Leaving print" );
}

Řešení
Odstraňte System.out nebo System.err, použijte místo toho profilovací nástroj nebo rámcový systém protokolování.

public static void main( String[] args ) {
List l = new ArrayList(10);
add( args, l );
}

private static void add( String[] args, List l ) {
for ( int i = 0; i < args.length; i++ ) {
l.add( args[ i ] );
}
}