I am trying to add create two ArrayList of vertices (setA, setB) which will store the stores for comparing them late how ever I am unable to add vertices to the arraylist.
here is the code
import java.util.*;
public class BipartiteGraph<Vertex> {
private String strName;
ArrayList<Vertex>[] vertexList;
public BipartiteGraph(){
vertexList = new ArrayList[2];
vertexList[0] = new ArrayList<Vertex>();
vertexList[1] = new ArrayList<Vertex>();
Scanner vertexInput = new Scanner(System.in);
int vertex;
vertex = vertexInput.nextInt();
for(int i = 0; i < 10; i++){
vertexList[0].add(vertexInput.nextInt());
}
}
}
Also if someone could guide me if I am in the right direction.
intto anArrayListthat containsVertexes.