From: Vijay Baharani For a weighted directed graph, the first X lines of the file contain the name of every vertex. A blank line follows. Next are sets of lines. In each set, the first line is a vertex name. All following lines up until a blank line are in pairs: the first line is the name of the vertex being pointed toward, and the second line is the weight of that directional edge. I am choosing to exclude having the number of vertices or edges stated in the text file. The end of the file is given by when readLine() returns null. Example: F R I J I J 13.0 F 5.0 F R 0.0 J 2.0 J R 7.0 R I 8.0 An undirected unweighted graph is almost exactly the same - I simply deleted the weights from the above file. Example: F R I J I J F F R J J R R I