Sun Microsystems ( SUNW) can't seem to quash rumors that it may be snatched up by a larger tech shop. Some market watchers say the speculation helps explain the sharp rise in Sun shares over the past six weeks, although analysts are skeptical about why anyone would want to buy the troubled server and storage maker. Thursday, CEO Scott McNealy called such speculation "nonsense," according to a Reuters report. He insists no one can afford to buy the company he co-founded 21 years ago. But the fact that McNealy felt compelled to comment raises the broader question: If Sun doesn't want to be acquired and nobody wants to acquire it, what's keeping the takeover rumors alive? The likely answer: A combination of wishful thinking by investors eager to see the stock rise and sentiment that a broader pickup in M&A is getting under way. The chatter about Sun may have gotten an extra boost from Oracle's ( ORCL) proposed takeover of PeopleSoft ( PSFT), says Dennis Garris, a partner with the law firm of Alston & Bird and former chief of M&A at the Securities and Exchange Commission. "Especially when an industry sees a significant high-profile deal announced like the Oracle-PeopleSoft deal, everyone wonders, 'Well, who's next?' It's an unanswered question as to what drives the market into M&A rumor speculation, but I think a lot of it is just hope that someone will find value in their investment," says Garris. Typically, the stock of an acquisition target rises. Indeed, Sun shares have jumped 55% since May 2, when rumors began circulating that it might be taken over. M&A lawyers agree that, in general, activity has picked up in just the past six months after being largely moribund for the past couple of years. "People who are interested in buying public corporations know stocks are still at a fairly decent price and things are out of the doldrums. They don't have the inherent risk they had two years ago that the economy could get even worse," says Philip Garon, chairman of the law firm of Faegre & Benson. Those conditions tend to generate more gossip about possible takeover targets, he adds. For now, most deals are expected to be confined to "middle-market" companies with sales of $25 million to $200 million, with acquisition targets likely to be those companies fretting over dwindling cash reserves. By comparison, Sun claims $12.5 billion in revenue with $2.6 billion in cash and short-term investments.