I am new to Java and got to access a legacy app that has a method like this which takes variable number of arguments.
MarkEdges(edge1,edge2,edge3...){...}
where:
Edge edge1 = new Edge(/*edge arguments go here*);
it works fine like that but I have a list of edges that I want to pass to MarkEdges:
List<Edge> edges = new ArrayList();
//populate the edges from a service then pass them for marking.
MarkEdges(edges);
but I can't compile it. I was hoping for something like spread operator of JS.