Update Connected.java

Problem Amazon Code Ninja - Connected Sets