China surpassed Japan as the world's second-largest stock market for the first time in three years amid growing investor confidence that policymakers in Beijing will revive the economy with monetary stimulus.