Posts by Juliano Ribeiro Americo • 1 point
1 post
-
0
votes4
answers2763
viewsA: Add array elements in Arraylist and print values
You can create an immutable list, but it is not possible to change it and is available from Java 9. Example:List<Integer> integers = List.of(1, 2, 3, 4); Another way is to create an array and…