mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-02-06 01:06:54 +07:00
11 lines
260 B
Java
11 lines
260 B
Java
// "Replace the loop with Collection.removeIf" "true"
|
|
import java.util.*;
|
|
|
|
public class Main {
|
|
public void removeEmpty(List<String> list) throws Exception {
|
|
// iterate over list
|
|
// if it's empty
|
|
/* remove! */
|
|
list.removeIf(String::isEmpty);
|
|
}
|
|
} |