public class Dijkstra { private static int N = 1000; private static int[][] Graph = { { 0, 1, 5, N, N, N, N, N, N }, { 1, 0, 3, 7, 5, N, N, N, N }, { 5, 3, 0, N, 1, 7, N, N, N }, { N, 7, N, 0, 2, N, 3, N, N }, { N, 5, 1, 2, 0, 3, 6, 9, N }, { N, N, 7…