Ah, welcome to junk food heaven. Coca-Cola (NYSE:KO), the king of sugar water, and Hershey (NYSE:HSY), the king of sweet chocolate, both announced higher sales and earnings yesterday. The stocks had opposite reactions to the news, though.

Coke's news, on the surface, certainly looks outstanding. Second-quarter earnings rose 18%. Cash flow was strong. The company repurchased $1 billion of its stock over the last six months. So what is so bad that the stock dropped nearly 10% at the opening?

The world of sugar water is measured in case volume. Coke had a 2% increase in the first quarter. The second quarter squeezed out only a 1% gain. That's not a good trend, and the anemic 5% increase in total sales looks less than kingly when compared with competitorPepsiCo's (NYSE:PEP) 8%.

To improve case volume, will Coke's new CEO up marketing costs and take earnings down from the 10%-or-better growth that analysts had been expecting? That concern, one brokerage downgrade, and analysts lowering their earnings estimates are all weighing on the stock today. Shares are off more than 7% to $45.

As was noted in the Foolish article on Cadbury Schweppes (NYSE:CSG), Coke is a king where it counts -- operating margins. This quarter was no exception. They rose from 28% to 30%. The stock market may be sour on the sugar-water company today, but those margins are extremely sweet.

Selling at 21 times 2004 estimated earnings and yielding a pleasing 2%, the stock is at the low end of its 52-week trading range and looking attractive based on its cash-generating strengths.

Hershey's stock rose slightly after the company announced a 5.2% increase in sales and a 16.4% increase in earnings. The treat in Hershey's earnings was a rise in margins despite an increase in commodity prices.

Hershey is an interesting company. As Paul Elliott pointed out, it is a good corporate citizen. As Tim Beyers noted, it is unloved by institutions. Selling at 23 times 2004 estimated earnings and 15 times cash flow, it looks interesting except for its high 71% debt-to-equity ratio (D/E).

For comparison, Coke has a 19% D/E, and broadly diversified Kraft Foods (NYSE:KFT) has a 40% D/E and sells for a lower price-to-earnings and price-to-cash flow.

Hershey has made excellent improvements in its margins -- although, at 16.9%, the operating margin pales when compared with Coke. The stock, close to its 52-week high and yielding 1.8%, is reasonably priced based on its growth prospects.

Interested in growing companies with excellent dividends? Try a free trial to Motley Fool Income Investor .

Fool contributor W.D. Crotty likes Hershey's stock symbol -- HSY. Those are the initials of W.D.'s stepdaughter. He owns stock in PepsiCo.