In the following Q&A session, the president held a town-hall style dialogue with 500-strong Chinee youth from Shanghai universities and took questions from both attendees and netizens.
When asked about his understanding of how to promote cultural diversity across the world, the President admitted that different countries should learn from each other.
"It was very important for the United States not to assume what is good for us is automatically good for somebody else," he said.
He cited his family as an example of diverse cultures, saying the family is like "the United Nations" as his father was from Kenya, his mother
from Kansas of the U.S. Midwest, while his sister was a half-Indonesian married to "a Chinese person from Canada."
After a Taiwan netizen challenged him about America's stance on the Taiwan issue, Obama said that his administration would continue to fully
support the one-China policy, and would be very pleased to see the improving cross-strait relationship.
"I have been clear in the past the United States supports a one-China policy. We do not want to change that policy or approach...I am very pleased with the reduction of tensions and improvement of the cross-strait relations," he said.
He noted it was his "deep desire and hope" that he would continue to see great improvement between the Chinese mainland and Taiwan in resolving issues.
Economic and commercial ties were helping to lower a lot of tensions, he said.
Obama said as some people looked over the past, he preferred to look towards the future.
As of security issue, the president asserted that the biggest threat to U.S. security was the terrorist groups like al-Qaida. "I do continue to believe the greatest threat to United States security are the terrorist networks like al-Qaida."
He said U.S. troops moved into Afghanistan because al-Qaida was being hosted by the Taliban in Afghanistan but the terror group has now moved over the border of Afghanistan and has networks with other extremist groups throughout the region.
The United States now has 68,000 troops fighting in Afghanistan. Obama is going to decide on whether to grant a request by the top U.S. commander in Afghanistan, Stanley McChrystal, to send 40,000 more troops.
"I do believe it is important for us to stabilize Afghanistan, so that the people of Afghanistan can protect themselves, and they can also be a partner in reducing the power of those extremist networks," he said.
The U.S. president admitted that defeating al-Qaida is a difficult task and is not just a military exercise.
Obama flew into Shanghai from Singapore on Sunday night to kick off his four-day visit to China, his first trip to the Asian country since taking office in January.
Later Monday, he left for Beijing, where he will hold talks with Chinese President Hu Jintao and meet with other Chinese leaders.