What do you want to save?
Add Code snippet
New code examples
-
Java 2022-03-05 05:40:24
swap items in arraylist java
public class ArrayListExample { public static void main(String[] args) { ArrayList<String> list = new ArrayList<>(Arrays.asList("a", &q... Add solution -
Java 2022-01-31 03:31:00
java replace element in list
list.set(1,"new value"); //example .. List<String> list = new ArrayList<>(); list.add("one"); list.add("two"); list.add("three"); System.out.println(list); // [one,two,three] list.set(1,"new"... Add solution -
Other 2021-11-18 19:39:18
https://stackoverflow.com/questions/27420014/how-to-filter-json-object
public class Test { public static void main(String[] args) throws Exception { Type type = new TypeToken<List<Student>>() {}.getType(); Gson gson = new GsonBuilder().registerTypeAdapter(type, new Student.StudentListDeseria... Add solution -
Java 2021-11-10 10:36:17
Arraylist swap calues
public class ArrayListExample { public static void main(String[] args) { ArrayList<String> list = new ArrayList<>(Arrays.asList("a", &q... Add solution