Japan recorded a trade deficit in May, the first in four months, as imports of electrical machinery surged, helping to offset a jump in exports, the Finance Ministry…