Well, we all knew it was coming eventually. China has finally overtaken Japan as the world's second-largest economy. According to the latest gross domestic product figures for the two countries, China's second-quarter nominal GDP of $1.34 trillion topped Japan's Q2 GDP of $1.29 trillion. Of course, this is only one quarter of data, and more data points will be needed to definitively crown China with the No. 2 title. But the trend is clear. China is on the rise, so how can investors profit?

The dragon awakens
Since China is poised to play an increasingly greater role on the world stage, investors would be shortsighted to skimp on exposure to this fast-growing economy. And since U.S. investors as a whole tend to overweight domestic stocks in their portfolio, there may be some room to add a bit of Chinese flavor to your equity lineup.

Of course, investors should be aware that investing in China is not a risk-free proposition. Although the country is growing like crazy, it is still a developing economy. That means things such as accounting systems, corporate transparency, and governance are not nearly as well-developed as they are in the United States. The degree to which the Chinese government can interfere in the economy is still troubling. And while China clearly represents a compelling long-term play, there are some short-term red flags waving right now, including a rapidly inflating property bubble which may very likely affect the nation's banking system when real estate corrects somewhere down the road. So don't fool yourself into thinking that it's all clear sailing for China here on out.

The big and small of it
That being said, if you're willing to ride out the almost guaranteed bumps in the road, there are ways to benefit from this rising superpower's growth. By selecting a handful of both large-cap and smaller-sized Chinese stocks, you can get exposure to dominant market players and more undiscovered names with rapid growth potential. On the larger side of things, juggernaut China Mobile (NYSE: CHL) faces incredible growth opportunities and a solid market share in its home country while selling at a discount relative to its industry peers.

Given that China recently surpassed the U.S. in energy consumption, investors may want to consider snapping up a few names that will benefit from rising demand for oil. In this space, big-name Chinese energy firms PetroChina (NYSE: PTR) and CNOOC (NYSE: CEO) are likely to do well as energy demand grows along with the Chinese population.

If you're looking for a smaller play on the Chinese market, consider fertilizer manufacturer Yongye International (Nasdaq: YONG). The firm has seen sales increase tremendously, thanks in part to government subsidies for small rural farmers. Yongye also recently announced that second-quarter earnings more than quadrupled over the past year. The company has forecast continued strong growth in the year ahead, offering future capital appreciation opportunities for investors.

If trying to pick individual stocks in an emerging country isn't your thing, investors can get a healthy slug of Chinese exposure via a low-cost exchange-traded fund. If you go this route, you don't need to buy an ETF that invests exclusively in China. Instead, take a broader focus and consider a diversified emerging market fund such as Vanguard Emerging Markets Stock ETF (NYSE: VWO). For a low 0.27% annual price tag, the fund offers an 18% exposure to China, while also providing an allocation to other red-hot markets like Brazil, Korea, and Taiwan.

A little help from our friends
Of course, one of the safest ways to invest in China is to do so with the help of an industry expert who has resources that the average investor simply doesn't have access to. One of the best funds in this space for China-seekers is Matthews Pacific Tiger (FUND: MAPTX). This fund looks for fast-growing names in the Asia Pacific region outside Japan. Right now, Chinese stocks make up 27% of fund assets. The fund has focused on companies such as travel service provider Ctrip.com International (Nasdaq: CTRP) and Internet search provider Baidu (Nasdaq: BIDU). These names boast five-year revenue growth rates of 45% and 94%, respectively, and should have ample opportunity for further growth in China's rapidly expanding market. This fund is not without volatility, but it is a first-rate long-term play on the Asian corner of the global market.

So let's extend our congratulations to China for reaching the No. 2 spot on the global economy chart. There will surely be obstacles for China as it continues to grow and expand, but this is a corner of the globe investors can ill afford to miss out on.

For more insider investing and personal financial planning tips, check out the Fool's Rule Your Retirement service, which provides top-notch retirement and mutual fund advice. You can start your free 30-day trial today.

Amanda Kish is the Fool's resident fund advisor for the Rule Your Retirement investment newsletter. At the time of publication, she did not own any of the funds or companies mentioned herein. CNOOC and Yongye International are Motley Fool Global Gains selections. Ctrip.com International is a Motley Fool Hidden Gems pick. Baidu is a Motley Fool Rule Breakers pick. The Fool owns shares of Yongye International, China Mobile, and Vanguard Emerging Markets Stock ETF. The Fool has a disclosure policy.