Type XXI submarines were a class of German diesel–electric Elektroboot (German: "electric boat") submarines designed during the Second World War. One hundred and eighteen were completed, with four being combat ready. During the war only two were put into active service and went on patrols, but these were not used in combat.