Japan's economy shrugged off predictions of a contraction and grew slightly during the April-to-June period, showing that the world's second-biggest economy is continuing to expand and that consumer confidence is rising.

The yen immediately strengthened on the news, surging to 108.97 to the U.S. dollar, from 110.78 late Wednesday in Tokyo.

The gross domestic product climbed 0.2 percent in the second quarter for an annualized growth rate of 0.9 percent, according to the Economic Planning Agency. That is well behind the surprising 2 percent first-quarter growth but better than analysts had expected.

Strong consumption growth and home purchases offset falling private investment. Consumer spending, which accounts for 60 percent of Japan's GDP, was up 0.8 percent, the second straight increase after a year of decline.

Investment in housing surged 16.1 percent, helped by low interest rates on housing loans, but corporate capital spending was down 4.0 percent.

"The Japanese economy is beginning to get back on a recovery track," Taichi Sakaiya, head of the Economic Planning Agency, told reporters. "But we are not yet securely on track and more economic measures are essential."

Analysts were also cautious. "We are in a slow recovery cycle and in the early stages of restructuring the private sector," said Keiko Kondo, a strategist with Merrill Lynch & Co. "We should not be tricked by this number. It doesn't necessarily mean that the economy is strong. We are still going through a difficult period."

Economists had predicted a drop in the GDP--a measure of the total value of all goods and services produced in a country--after the strong first-quarter gain, which translated into an annualized growth rate of 8.1 percent. They lowered their expectations further when the Finance Ministry announced this week that companies spent 13.4 percent less on factories and equipment in the second quarter than they did a year earlier.

Sakaiya said he was confident now that the government would meet its 0.5 percent growth target for fiscal 1999, which ends next March.

Sakaiya said earlier this week that the government would propose additional spending regardless of the second-quarter GDP figures.

The new GDP figures will play a big role in determining the size of a supplemental budget that officials have been talking about. Senior ruling party lawmaker Taku Yamasaki said Wednesday that $90 billion in pump-priming measures were needed.

"We are not in a stage where the economy has already taken off. We need to take one more step," he said.

The government poured about $370 billion into the economy in fiscal 1998 supplementary budgets.

Personal consumption is considered key to a recovery, and it had been mired since the government raised the consumption tax in April 1997 from 3 percent to 5 percent.

Unwilling to reverse the tax increase, the government tried various other schemes to get people to spend, including income tax cuts and this year's $6 billion program to distribute spending vouchers worth about $175 each to senior citizens and youth under the age of 15.

But with fears that the pension system will be inadequate for their retirement, the failures of several big financial institutions and with the unemployment rate going up steadily to 4.9 percent, people have saved rather than spent. Even the spending vouchers were used for necessities such as school uniforms, allowing families to save $175.

Still, the first quarter showed an increase in private consumption, cheering economists, and the second quarter continued the trend.

"Consumers are loosening their purse strings" even though wages are not growing, Sakaiya said. "It's just that the propensity to spend grew."

"It's clearly consumer driven," said James Malcolm, an economist with J.P. Morgan Securities Asia. "The growth in consumer confidence is offsetting disarray in the labor market."

He said that with the new GDP figures, the near-term outlook is very good for the Japanese economy, which has been in a recession since late 1997.

Business confidence is also improving, with an increasing number of big companies optimistic that the economy will grow, according to a Finance Ministry survey of more than 10,000 firms.

Despite their optimism, however, they are spending less on investment as they try to cut capacity and improve their balance sheets.

Special correspondent Akiko Kashiwagi contributed to this report.