Update dijkstra.java

removed unneeded objects