The most advanced U-Boot of WWII was the Type XXI but unfortunataley for the Germans it came too late.

U-3008 in American service
Ex-German submarine U-3008 of Type XXI was taken over by the US Navy after 1945 and used as a test vessel. Photo from 15 April, 1948.
This was the boat that perhaps could have won the war in the Atlantic for the Germans had she been in the water maybe 2 years earlier. She was the first real combat submarine that was meant to dwell in the deep and not just retreat to it once in danger.
These boats had much better crew facilities than previous classes, much more silent underwater, freezer for foodstuffs, a shower and a basin and little things like that. Also they had hydrolic torpedo reload system that enabled the commander to reload all 6 tubes in something like 10 minutes which was even less than it took to reload one tube on the VIIC normally.
3-times the electrical power of the VIIC gave the boat enormous underwater range compared to the older types and this boat could submerge far beyond the Bay of Biscay from the French bases so the Valley of Death was a thing of the past for them really. It took the boat 3-5 hours to re-charge the batteries with the Schnorchel once every 2-3 days if travelling at moderate 4-8 knots and was thus much less in danger from aircraft which sank about 56% of all U-boats lost in the war.
If the boat carried TMC mines she could also carry 14 torpedoes.
Technical information for type XXI
Displacement:
(tons) 1621 (sf)
1819 (sm)
2100 (total)
Length: (m) 76,70 oa
60,50 ph
Beam: (m) 8,00 oa
5,30 ph
Draught: (draft) 6,32 m
Height: 11,30 m
Power: (hp) 4000 (sf)
4400 (sm)
Speed:
(knots) 15,6 (sf)
17,2 (sm)
Range:
(miles / knots) 15500/10 (sf)
340/5 (sm)
Torpedoes: 23
6/0 (bow / stern tubes)
Mines: 12 TMC
Deck gun: No deck gun
Crew: 57-60 men
Max depth: ca. 280 m
(919 feet)
sm = submerged, sf = surfaced, ph = pressure hull,
oa = overall, hp = horsepower.
http://uboat.net/types/xxi.htm