/reset flags vertexlist[jwasvisited false/end mst(as you can seethis code is very similar to dfs(in the else statementhoweverthe current vertex and its next unvisited neighbor are displayed these two vertices define the edge that the algorithm is currently traveling to get to new vertexand it' these edges that make up the minimum spanning tree in the main(part of the mst java programwe create graph by using these statementsgraph thegraph new graph()thegraph addvertex(' ')/ thegraph addvertex(' ')/ thegraph addvertex(' ')/ thegraph addvertex(' ')/ thegraph addvertex(' ')/ thegraph addedge( )thegraph addedge( )thegraph addedge( )thegraph addedge( )thegraph addedge( )thegraph addedge( )thegraph addedge( )thegraph addedge( )thegraph addedge( )thegraph addedge( )(start for mst/ab /ac /ad /ae /bc /bd /be /cd /ce /de the graph that results is the one shown in figure - when the mst(method has done its workonly four edges are leftas shown in figure - here' the output from the mst java programminimum spanning treeab bc cd de as we notedthis is only one of many possible minimum scanning trees that can be created from this graph using different starting vertexfor examplewould result in different tree so would small variations in the codesuch as starting at the end of the vertexlist[instead of the beginning in the getadjunvisitedvertex(method the mst java program listing shows the mst java program it' similar to dfs javaexcept for the mst(method and the graph created in main(listing the mst java program /mst java /demonstrates minimum spanning tree /to run this programc>java mstapp