Java warning: [unchecked] unchecked conversion
问题 I have the following (partial) class: public class Graph<O> { private ArrayList<Edge> edges; public ArrayList<Edge> getEdges() { return edges; } } Now, when calling the method getEdges() somewhere else and storing the result in a variable of type ArrayList<Edge> , I get warning: [unchecked] unchecked conversion : OtherFile.java:101: warning: [unchecked] unchecked conversion ArrayList<Edge> edges = graph.getEdges(); ^ required: ArrayList<Edge> found: ArrayList I have looked at multiple other