Run ❯
Get your
own Java
server
×
Change Orientation
Change Theme, Dark/Light
Go to Spaces
import java.util.ArrayList; public class Main { public static void main(String[] args) { ArrayList
numbers = new ArrayList
(); numbers.add(5); numbers.add(9); numbers.add(8); numbers.add(6); numbers.add(1); numbers.removeIf( n -> n % 2 == 0 ); System.out.println(numbers); } }
[5, 9, 1]