President Barack Obama says world leaders are "rattled" by Donald Trump and have good reason to feel that way.

President Obama discussed the 2016 presidential campaign during a news conference in Japan, saying foreign leaders are surprised by Mr Trump and not sure how seriously to take the things he says.

He said many of the likely Republican nominee's proposals display ignorance about world affairs, a cavalier attitude or an interest in getting "tweets and headlines".

The president also downplayed Democratic concerns about the long-running primary fight between Hillary Clinton and Bernie Sanders.

He said sometimes in a primary people get "grumpy". But President Obama said the difference between Democrats and Republicans this year is the Democratic candidates are not that ideologically different.

President Obama's comments to reporters came amid growing Democratic impatience to see the party unite behind Ms Clinton, who is close to netting the number of delegates needed for the nomination but has been unable to persuade Mr Sanders to exit the race.

Many Democrats, including prominent senators, have started publicly voicing frustration with Mr Sanders, who shows no signs of a quick departure despite near-impossible odds of overtaking Ms Clinton.

Rather, Mr Sanders has warned of a potentially "messy" Democratic Convention in Philadelphia in July, stoking concerns for the Democratic Party and for Clinton's campaign, both of which are eager to shift their focus to attacking Mr Trump and courting voters needed to win the general election in November.

Yet President Obama brushed off calls for him to get more personally involved in brokering a resolution, saying that he's still inclined to let the Democratic primary play itself out.

He likened the hard-fought campaign between Ms Clinton and Mr Sanders to the one he waged with Ms Clinton in 2008.

"During primaries, people get a little grumpy with each other. Somebody's supporter pops off and there's a certain build-up of aggravation," President Obama said.

"Every little speed bump, conflict trash-talking that takes place is elevated."

He urged both Democratic candidates to "try to stick to the issues", adding that the grumpiness often stems from voters' frustration when the campaign instead becomes dominated by talk about "personalities and character".