The German U-boats was detected through sonar. <span>Allies used sonar</span><span> to detect submerged warships such as the U-boat, which cannot be seen through eyes. But it can only detect those that are under the waters and not on the surface. </span>