I found this primMST java class source code online for the prim algorithm. It was accompanied by another class called BinaryMinHeap, which is used in the primMST class. I copied and pasted the primMST code in NetBeans, and it gave me error labels in the text editor for three classes that were used in the primMST class. They are class Edge, Graph, and Vertex.
There was another error for class List, but I fixed that by using the import statement import java.util.*;
Is there an import statement for the class called "Edge", "Graph", and "Vertex"? I've been searching google but I couldn't find anything. Below is the source code for primMST class.
There's only one import statement in that code. And since those three classes you mentioned aren't in the java.util package, it follows that the import statement which is there doesn't import those three classes.
I don't quite see where Google comes into the picture. What did you search for and what did you expect to find?
I suggest going to the same place you downloaded PrimMST from and see if it also has those other classes. The classes you are looking for are not part of the Java release. There are example implementations on the internet but there's not guarantee that they will be compatible with your PrimMST class.