weighted graphs listing continued public int distance/distance from src to dest /public edge(int svint dvint /constructor srcvert svdestvert dvdistance //end class edge ///////////////////////////////////////////////////////////////class priorityq /array in sorted orderfrom max at to min at size- private final int size private edge[quearrayprivate int size/public priorityq(/constructor quearray new edge[size]size /public void insert(edge item/insert item in sorted order int jfor( = <sizej++/find place to insert ifitem distance >quearray[jdistance breakfor(int =size- >=jk--/move items up quearray[ + quearray[ ]quearray[jitem/insert item size++/public edge removemin(/remove minimum item return quearray[--size]