US President Donald Trump inspected Japan's largest warship, the Kaga, during a state visit to the country.