Japan's Panasonic and Sharp pointed to better times ahead as earnings improved thanks to an overhaul of their businesses and the yen's decline.

But their recovery was held back by weak sales of consumer gadgets.

The nine-month results comes as the country's electronics giants, including Sony, undergo painful restructurings aimed at stemming years of record losses.

Japan's struggling electronics sector has faced serious challenges in recent years, with television sales plunging while foreign rivals such as Apple and Samsung surging past them in the lucrative smartphone market. 

Digital camera makers have also suffered as the move to smartphones has sent hammered demand for point-and-shoot offerings.

Panasonic said today that it had swung back into the black with a nine-month net profit of $2.4 billion due to cost cutting, buoyant sales in its auto division including GPS navigation products, and the yen's fall over the past year.

The 243 billion yen net profit between April and December reversed a net loss of 623.8 billion yen over the same period a year ago, while sales came in at 5.68 trillion yen, a rise of 4.4%, it added. 

Panasonic - recovering from combined losses topping $15 billion in the past two fiscal years - expects to earn 100 billion yen in net profit for the year to March.

But sales of household appliances and digital consumer products, including its struggling television business, remained weak as the company shifts its attention away from loss-making divisions as part of a wider restructuring.

"Sales of digital consumer products decreased while focusing on profitability rather than sales volume," it said in a statement.

Panasonic has said it will abandon the consumer smartphone market and stop production of plasma television screens, in line with a broader industry shift away from plasma units. Hitachi and Pioneer have also exited the market in recent years.

Sharp, maker of Aquos-brand electronics, said it booked a 17.7 billion yen net profit in the months from April to December, reversing a net loss of 424.3 billion yen a year earlier.

Sales jumped 21% on brisk demand for panels, including its popular "IGZO" displays for mobile phones, it said.
The firm added that it had also made big cuts in labour costs and capital investment.

It boosted its full-year operating profit forecast by 25% to 100 billion yen, while leaving an annual net profit forecast unchanged at 5 billion yen.

The move back to profitability is a big reversal for Sharp, which warned in 2012 that it might go out of business as it scrambled to secure crucial bank loans while offering its Osaka headquarters as collateral.

Sony, which reports its earnings on Thursday, has also returned to profit after losing money four years in a row.

Strong demand for its Xperia-brand smartphones and new PlayStation 4 games console helped boost results, along with a money-making movie business.

But Sony's jump back into the black was still largely due to fluctuations in the value of the yen and gains from a string of asset sales - including unloading its Manhattan office building for over $1 billion.