Japan’s trade balance unexpectedly stayed in the black for a third consecutive month on strong exports and a sharp drop in energy imports.