In modern times, in many cases the old ditches were covered by the towns growing up around, but there are surviving castles preserving at least the innermost moat (the Matsumoto Castle). Also, some of the reconstructed castles, such as the Odawara Castle, were rebuilt together with the moats, as you can see in this photo...
EXIF info:
Nikon D90
Lens: VR 18-55mm F/3.5-5.6G
Focal Length: 22mm
Aperture: F/5.6
Shutter Speed: 1/160s
ISO Sensitivity: ISO 320