How to return
public static List getListForRemove(List list)
Neither list is appropriate
LinkedList<Object> arrayList = new LinkedList<>();
ArrayList<Object> arrayList = new ArrayList<>();
how to solve?
Must come up
LinkedList<Object> arrayList = new LinkedList<>();
but it does not workpackage com.codegym.task.task08.task0811;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
/*
Method quartet
*/
public class Solution {
public static BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
public static List getListForGet() {
ArrayList<Object> arrayList = new ArrayList<>();
return arrayList;
}
public static List getListForSet() throws IOException{
ArrayList<Object> arrayList = new ArrayList<>();
return arrayList;
}
public static List getListForAddOrInsert() throws IOException {
LinkedList<Object> arrayList = new LinkedList<>();
return arrayList;
}
public static List getListForRemove(List list) {
LinkedList<Object> arrayList = new LinkedList<>();
return arrayList;
}
public static void main(String[] args) {
}
}