From 7ef06c0b26431a9f5da8872d30112ee9b6f0e102 Mon Sep 17 00:00:00 2001 From: EAlexa Date: Tue, 7 Apr 2020 16:01:30 +0200 Subject: [PATCH] added type parameter --- DataStructures/Graphs/ConnectedComponent.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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);