(CNN) Donald Trump on Thursday embraced President Barack Obama's critique of him that the presumptive Republican presidential nominee's candidacy has "rattled" world leaders.

"When you rattle someone, that's good," Trump said at a news conference in North Dakota. "If they're rattled in a friendly way, that's a good thing ... not a bad thing."

Obama touched on the rancorous U.S. presidential race at a press conference Thursday from the G-7 summit in Japan, saying that presumptive Trump's statements had his fellow world leaders concerned.

"They're rattled by him and for good reason," Obama said. "Because a lot of the proposals that he's made display either ignorance of world affairs or a cavalier attitude or an interest in getting tweets and headlines instead of actually thinking through what is required to keep America safe."

"They are surprised by (Trump), not sure how to take some of his pronouncements," the President added.

Obama said the world is watching the campaign.

"The world pays attention to U.S. elections," Obama said. "They pay more attention to our elections sometimes than we pay to theirs. The U.S. is ... at the heart of the international order and even those countries that are critical of us...know that ultimately things don't hold together so well if the U.S. isn't making good decisions and they count on us to provide stability when making global decisions."

People get 'grumpy'

Asked about the continued divisiveness on display on the Democratic side of the 2016 race, Obama said people get "grumpy" during the primaries, including his own back in 2008, but will ultimately come together and argued that Hillary Clinton and Bernie Sanders largely agree on the policy front, but differ on tactics.

The President said that and that it's important to finish the Democratic primary contest in a way that doesn't leave anyone with ruffled feathers.

"I would urge and have urged, both sides to stick to the issues," Obama said. "They're both good people, I know them both well, and I think its' important to try to end this in a way that leaves both sides feeling proud of what they've done."

He added, "I guarantee you that the eventual nominee sure wishes it were over now. It's a grind, it's hard."

The president said he wanted the Democratic primary to "play out, let voters make up their minds."

Obama also largely deflected questions about Clinton's use of a private email server, saying he's addressed the topic previously and the questions would be better put to the campaign.

Photos: Hillary Clinton's life in the spotlight Photos: Hillary Clinton's life in the spotlight Hillary Clinton accepts the Democratic Party's nomination for president at the Democratic National Convention in Philadelphia on July 28, 2016. The former first lady, U.S. senator and secretary of state was the first woman to lead the presidential ticket of a major political party. Hide Caption 1 of 43 Photos: Hillary Clinton's life in the spotlight Before marrying Bill Clinton, she was Hillary Rodham. Here she attends Wellesley College in Massachusetts. Her commencement speech at Wellesley's graduation ceremony in 1969 attracted national attention. After graduating, she attended Yale Law School. Hide Caption 2 of 43 Photos: Hillary Clinton's life in the spotlight Rodham was a lawyer on the House Judiciary Committee, whose work led to impeachment charges against President Richard Nixon in 1974. Hide Caption 3 of 43 Photos: Hillary Clinton's life in the spotlight In 1975, Rodham married Bill Clinton, whom she met at Yale Law School. He became the governor of Arkansas in 1978. In 1980, the couple had a daughter, Chelsea. Hide Caption 4 of 43 Photos: Hillary Clinton's life in the spotlight Arkansas' first lady, now using the name Hillary Rodham Clinton, wears her inaugural ball gown in 1985. Hide Caption 5 of 43 Photos: Hillary Clinton's life in the spotlight The Clintons celebrate Bill's inauguration in Little Rock, Arkansas, in 1991. He was governor from 1983 to 1992, when he was elected President. Hide Caption 6 of 43 Photos: Hillary Clinton's life in the spotlight Bill Clinton comforts his wife on the set of "60 Minutes" after a stage light broke loose from the ceiling and knocked her down in January 1992. Hide Caption 7 of 43 Photos: Hillary Clinton's life in the spotlight In June 1992, Clinton uses a sewing machine designed to eliminate back and wrist strain. She had just given a speech at a convention of the International Ladies' Garment Workers Union. Hide Caption 8 of 43 Photos: Hillary Clinton's life in the spotlight During the 1992 presidential campaign, Clinton jokes with her husband's running mate, Al Gore, and Gore's wife, Tipper, aboard a campaign bus. Hide Caption 9 of 43 Photos: Hillary Clinton's life in the spotlight Clinton accompanies her husband as he takes the oath of office in January 1993. Hide Caption 10 of 43 Photos: Hillary Clinton's life in the spotlight The Clintons share a laugh on Capitol Hill in 1993. Hide Caption 11 of 43 Photos: Hillary Clinton's life in the spotlight Clinton unveils the renovated Blue Room of the White House in 1995. Hide Caption 12 of 43 Photos: Hillary Clinton's life in the spotlight Clinton waves to the media in January 1996 as she arrives for an appearance before a grand jury in Washington. The first lady was subpoenaed to testify as a witness in the investigation of the Whitewater land deal in Arkansas. The Clintons' business investment was investigated, but ultimately they were cleared of any wrongdoing. Hide Caption 13 of 43 Photos: Hillary Clinton's life in the spotlight The Clintons hug as Bill is sworn in for a second term as President. Hide Caption 14 of 43 Photos: Hillary Clinton's life in the spotlight The first lady holds up a Grammy Award, which she won for her audiobook "It Takes a Village" in 1997. Hide Caption 15 of 43 Photos: Hillary Clinton's life in the spotlight The Clintons dance on a beach in the U.S. Virgin Islands in January 1998. Later that month, Bill Clinton was accused of having a sexual relationship with former White House intern Monica Lewinsky. Hide Caption 16 of 43 Photos: Hillary Clinton's life in the spotlight Clinton looks on as her husband discusses the Monica Lewinsky scandal in the Roosevelt Room of the White House on January 26, 1998. Clinton declared, "I did not have sexual relations with that woman." In August of that year, Clinton testified before a grand jury and admitted to having "inappropriate intimate contact" with Lewinsky, but he said it did not constitute sexual relations because they had not had intercourse. He was impeached in December on charges of perjury and obstruction of justice. Hide Caption 17 of 43 Photos: Hillary Clinton's life in the spotlight The first family walks with their dog, Buddy, as they leave the White House for a vacation in August 1998. Hide Caption 18 of 43 Photos: Hillary Clinton's life in the spotlight President Clinton makes a statement at the White House in December 1998, thanking members of Congress who voted against his impeachment. The Senate trial ended with an acquittal in February 1999. Hide Caption 19 of 43 Photos: Hillary Clinton's life in the spotlight Clinton announces in February 2000 that she will seek the U.S. Senate seat in New York. She was elected later that year. Hide Caption 20 of 43 Photos: Hillary Clinton's life in the spotlight Clinton makes her first appearance on the Senate Environment and Natural Resources Committee. Hide Caption 21 of 43 Photos: Hillary Clinton's life in the spotlight Sen. Clinton comforts Maren Sarkarat, a woman who lost her husband in the September 11 terrorist attacks, during a ground-zero memorial in October 2001. Hide Caption 22 of 43 Photos: Hillary Clinton's life in the spotlight Clinton holds up her book "Living History" before a signing in Auburn Hills, Michigan, in 2003. Hide Caption 23 of 43 Photos: Hillary Clinton's life in the spotlight Clinton and another presidential hopeful, U.S. Sen. Barack Obama, applaud at the start of a Democratic debate in 2007. Hide Caption 24 of 43 Photos: Hillary Clinton's life in the spotlight Obama and Clinton talk on the plane on their way to a rally in Unity, New Hampshire, in June 2008. She had recently ended her presidential campaign and endorsed Obama. Hide Caption 25 of 43 Photos: Hillary Clinton's life in the spotlight Obama is flanked by Clinton and Vice President-elect Joe Biden at a news conference in Chicago in December 2008. He had designated Clinton to be his secretary of state. Hide Caption 26 of 43 Photos: Hillary Clinton's life in the spotlight Clinton, as secretary of state, greets Russian Prime Minister Vladimir Putin during a meeting just outside Moscow in March 2010. Hide Caption 27 of 43 Photos: Hillary Clinton's life in the spotlight The Clintons pose on the day of Chelsea's wedding to Marc Mezvinsky in July 2010. Hide Caption 28 of 43 Photos: Hillary Clinton's life in the spotlight In this photo provided by the White House, Obama, Clinton, Biden and other members of the national security team receive an update on the mission against Osama bin Laden in May 2011. Hide Caption 29 of 43 Photos: Hillary Clinton's life in the spotlight Clinton checks her Blackberry inside a military plane after leaving Malta in October 2011. In 2015, The New York Times reported that Clinton exclusively used a personal email account during her time as secretary of state. The account, fed through its own server, raises security and preservation concerns. Clinton later said she used a private domain out of "convenience," but admits in retrospect "it would have been better" to use multiple emails. Hide Caption 30 of 43 Photos: Hillary Clinton's life in the spotlight Clinton arrives for a group photo before a forum with the Gulf Cooperation Council in March 2012. The forum was held in Riyadh, Saudi Arabia. Hide Caption 31 of 43 Photos: Hillary Clinton's life in the spotlight Obama and Clinton bow during the transfer-of-remains ceremony marking the return of four Americans, including U.S. Ambassador Christopher Stevens, who were killed in Benghazi, Libya, in September 2012. Hide Caption 32 of 43 Photos: Hillary Clinton's life in the spotlight Clinton ducks after a woman threw a shoe at her while she was delivering remarks at a recycling trade conference in Las Vegas in 2014. Hide Caption 33 of 43 Photos: Hillary Clinton's life in the spotlight Clinton, now running for President again, performs with Jimmy Fallon during a "Tonight Show" skit in September 2015. Hide Caption 34 of 43 Photos: Hillary Clinton's life in the spotlight Clinton testifies about the Benghazi attack during a House committee meeting in October 2015. "I would imagine I have thought more about what happened than all of you put together," she said during the 11-hour hearing. "I have lost more sleep than all of you put together. I have been wracking my brain about what more could have been done or should have been done." Months earlier, Clinton had acknowledged a "systemic breakdown" as cited by an Accountability Review Board, and she said that her department was taking additional steps to increase security at U.S. diplomatic facilities. Hide Caption 35 of 43 Photos: Hillary Clinton's life in the spotlight U.S. Sen. Bernie Sanders shares a lighthearted moment with Clinton during a Democratic presidential debate in October 2015. It came after Sanders gave his take on the Clinton email scandal. "The American people are sick and tired of hearing about the damn emails," Sanders said. "Enough of the emails. Let's talk about the real issues facing the United States of America." Hide Caption 36 of 43 Photos: Hillary Clinton's life in the spotlight Clinton is reflected in a teleprompter during a campaign rally in Alexandria, Virginia, in October 2015. Hide Caption 37 of 43 Photos: Hillary Clinton's life in the spotlight Clinton walks on her stage with her family after winning the New York primary in April. Hide Caption 38 of 43 Photos: Hillary Clinton's life in the spotlight After Clinton became the Democratic Party's presumptive nominee, this photo was posted to her official Twitter account. "To every little girl who dreams big: Yes, you can be anything you want -- even president," Clinton said. "Tonight is for you." Hide Caption 39 of 43 Photos: Hillary Clinton's life in the spotlight Obama hugs Clinton after he gave a speech at the Democratic National Convention in Philadelphia. The president said Clinton was ready to be commander in chief. "For four years, I had a front-row seat to her intelligence, her judgment and her discipline," he said, referring to her stint as his secretary of state. Hide Caption 40 of 43 Photos: Hillary Clinton's life in the spotlight Clinton arrives at a 9/11 commemoration ceremony in New York on September 11. Clinton, who was diagnosed with pneumonia two days before, left early after feeling ill. A video appeared to show her stumble as Secret Service agents helped her into a van. Hide Caption 41 of 43 Photos: Hillary Clinton's life in the spotlight Clinton addresses a campaign rally in Cleveland on November 6, two days before Election Day. She went on to lose Ohio -- and the election -- to her Republican opponent, Donald Trump. Hide Caption 42 of 43 Photos: Hillary Clinton's life in the spotlight After conceding the presidency to Trump in a phone call earlier, Clinton addresses supporters and campaign workers in New York on Wednesday, November 9. Her defeat marked a stunning end to a campaign that appeared poised to make her the first woman elected US president. Hide Caption 43 of 43

Thursday morning saw the leaders of Japan, the U.S., UK, Italy, Germany, France, Italy and Canada gather in the grounds of the Ise-Jingu shrine, a 2,000-year-old temple in central Japan.

Obama also said he is going to Hiroshima Friday to underscore the "very real risks" of nuclear weapons and the "urgency that we all should have," he said.

He will become the first U.S. President to visit the Japanese city where the first atomic bomb was dropped.

Obama told reporters that the dropping of the bomb was an "inflection point in modern history" and is something "all of us have had to deal with in one way or another."

Photos: Obama visits Vietnam, Japan President Barack Obama and Japanese Prime Minister Shinzo Abe shake hands after laying wreaths at the Hiroshima Peace Memorial Park in Hiroshima on Friday, May 27. Obama, the first sitting president to visit Hiroshima, called for a "world without nuclear weapons," during his speech but his remarks stopped short of an apology. Hide Caption 1 of 23 Photos: Obama visits Vietnam, Japan Obama told U.S. and Japanese troops on May 27 at the Iwakuni Marine Corps Air Station in Iwakuni, Japan: "This afternoon I will visit Hiroshima. This is an opportunity to honor the memory of all those who were lost in World War II." Hide Caption 2 of 23 Photos: Obama visits Vietnam, Japan President Obama greets members of the U.S. and Japanese military as he arrives at Marine Corps Air Station Iwakuni in Iwakuni on May 27. Hide Caption 3 of 23 Photos: Obama visits Vietnam, Japan From left: Italian Prime Minister Matteo Renzi, European Commission President Jean-Claude Juncker, French President François Hollande, Canadian Prime Minister Justin Trudeau, German Chancellor Angela Merkel, U.S. President Barack Obama, Japanese Prime Minister Shinzo Abe, European Council President Donald Tusk and British Prime Minister David Cameron walk past the Kagura-den as they visit Ise Jingu shrine in Ise, Japan, on Thursday, May 26. Obama is visiting Japan and Vietnam during his 10th trip to Asia. Hide Caption 4 of 23 Photos: Obama visits Vietnam, Japan World leaders join in a ceremony to plant trees at Ise Jingu shrine in Ise, Japan, on May 26. Obama and other major world leaders are in Japan for a Group of Seven, or G7, summit. Hide Caption 5 of 23 Photos: Obama visits Vietnam, Japan From left: British Prime Minister David Cameron, Italian Prime Minister Matteo Renzi, U.S. President Barack Obama and Canadian Prime Minister Justin Trudeau talk together after a group photo session at the G7 summit in Shima, Japan, on May 26. Hide Caption 6 of 23 Photos: Obama visits Vietnam, Japan U.S. President Barack Obama pauses for a translation during a bilateral meeting with Japanese Prime Minister Shinzo Abe in Shima, Japan, on Wednesday, May 25. Hide Caption 7 of 23 Photos: Obama visits Vietnam, Japan Obama is greeted by U.S. Ambassador to Japan Caroline Kennedy and her husband, Edwin Arthur Schlossberg, at the airport in Tokoname, Japan, on May 25. Hide Caption 8 of 23 Photos: Obama visits Vietnam, Japan Obama shakes hands after speaking at a town-hall event in Ho Chi Minh City, Vietnam, on May 25. Hide Caption 9 of 23 Photos: Obama visits Vietnam, Japan Vietnamese rapper Suboi raps during the town-hall event, which was for the Young Southeast Asian Leaders Initiative. Hide Caption 10 of 23 Photos: Obama visits Vietnam, Japan Obama tours through entrepreneur demonstrations in Ho Chi Minh City on Tuesday, May 24. Hide Caption 11 of 23 Photos: Obama visits Vietnam, Japan Obama pays his respects during a visit to the Jade Pagoda in Ho Chi Minh City on May 24. Hide Caption 12 of 23 Photos: Obama visits Vietnam, Japan Obama waves to locals during a visit to a shopping district in Hanoi, Vietnam, on May 24. Hide Caption 13 of 23 Photos: Obama visits Vietnam, Japan Obama shakes hands with chef Anthony Bourdain in a shopping area of Hanoi on May 24. The President sat down with Bourdain to film a scene for CNN's "Parts Unknown." Hide Caption 14 of 23 Photos: Obama visits Vietnam, Japan People gather in the rain to watch Obama's motorcade in Hanoi on May 24. Hide Caption 15 of 23 Photos: Obama visits Vietnam, Japan Obama meets with members of the Vietnamese Civil Society in Hanoi on May 24. Hide Caption 16 of 23 Photos: Obama visits Vietnam, Japan Obama delivers remarks at the National Convention Center in Hanoi on May 24. Obama made a forceful case for human rights in Vietnam and called for the "peaceful resolution" of disputes in the South China Sea. Hide Caption 17 of 23 Photos: Obama visits Vietnam, Japan Obama walks to the left of Thi Kim Ngan, chairwoman of Vietnam's National Assembly, at the Presidential Palace in Hanoi on Monday, May 23. Hide Caption 18 of 23 Photos: Obama visits Vietnam, Japan Obama meets with Nguyen Phu Trong, the Vietnamese Communist Party's general secretary, in Hanoi on May 23. Hide Caption 19 of 23 Photos: Obama visits Vietnam, Japan Obama, with Secretary of State John Kerry and other Cabinet members, attends a meeting with Vietnamese Prime Minister Nguyen Xuan Phuc, third from right, on May 23. Hide Caption 20 of 23 Photos: Obama visits Vietnam, Japan Obama gives a toast during a state luncheon hosted by Vietnam's President in Hanoi on May 23. Hide Caption 21 of 23 Photos: Obama visits Vietnam, Japan Obama holds a news conference with Vietnamese President Tran Dai Quang on May 23. Obama announced the United States is fully lifting the decades-long ban on the sale of military equipment to Vietnam. He said the removal of the ban was part of a deeper defense cooperation with the country and dismissed suggestions it was aimed at countering China's growing strength in the region. Hide Caption 22 of 23 Photos: Obama visits Vietnam, Japan The two Presidents listen to their countries' national anthems during a welcoming ceremony at the Presidential Palace in Hanoi on May 23. Hide Caption 23 of 23

He added that the "backdrop of a nuclear event remains something that, I think, presses on the back of our imaginations."

Obama also remarked on importance of reducing nuclear weapons and the progress made in that arena, citing the Iran deal.

Obama said that nuclear proliferation, particularly from North Korea, remained a major concern.

"Obviously ISIL using rifles, crude bombs, could kill a lot of people in a Paris or a Brussels and people are rightly insisting the world community stamp out ISIL and there is a reason why were focused on that," he said, using another acronym for the terror group.

JUST WATCHED Obama and Vietnam's 'Queen of Hip Hop' Replay More Videos ... MUST WATCH Obama and Vietnam's 'Queen of Hip Hop' 01:58

But, he added: "We can't focus on the short term ... when you have a regime (in North Korea) that is so isolated and flouts international rules, devotes national resources hell bent on getting nuclear weapons."

Obama said the G-7 meetings so far had been "extremely productive."

"For us to (be able to) get together and focus on critical issues ... is vitally important," he said.

He said the meetings had focused on trade and issues facing the global economy, and how the group could work to accelerate growth and "put people back to work," and the importance of stepping back from protectionist policies that leave countries collectively weaker.