Update ShortestPath.java