Completely connected Java implementation