diff --git a/DataStructures/Graphs/ConnectedComponent.java b/DataStructures/Graphs/ConnectedComponent.java index 7029a8d8..4582bfd4 100644 --- a/DataStructures/Graphs/ConnectedComponent.java +++ b/DataStructures/Graphs/ConnectedComponent.java @@ -108,7 +108,7 @@ class Graph> { public class ConnectedComponent { public static void main(String[] args) { - Graph graphChars = new Graph(); + Graph graphChars = new Graph<>(); // Graph 1 graphChars.addEdge('a', 'b'); @@ -123,7 +123,7 @@ public class ConnectedComponent { graphChars.addEdge('w', 'w'); - Graph graphInts = new Graph(); + Graph graphInts = new Graph<>(); // Graph 2 graphInts.addEdge(1, 2);