Japan condemned US President Donald Trump for comparing recent US strikes on Iran to the bombing of Hiroshima and Nagasaki that ended World War II.