adjacency matrix adjmatyou filled it with to insert the edgeyou say adjmat[ ][ adjmat[ ][ if you were using an adjacency listyou would add to the list for and to the list for the graph class let' look at class graph that contains methods for creating vertex list and an adjacency matrixand for adding vertices and edges to graph objectclass graph private final int max_verts private vertex vertexlist[]/array of vertices private int adjmat[][]/adjacency matrix private int nverts/current number of vertices /public graph(/constructor vertexlist new vertex[max_verts]/adjacency matrix adjmat new int[max_verts][max_verts]nverts for(int = <max_vertsj++/set adjacency for(int = <max_vertsk++/matrix to adjmat[ ][ /end constructor /public void addvertex(char lab/argument is label vertexlist[nverts++new vertex(lab)/public void addedge(int startint endadjmat[start][end adjmat[end][start /public void displayvertex(int vsystem out print(vertexlist[vlabel)