Ah, another child who fails at Internet 101: "How To Search The Internet And Not Look Like An Idiot."
The popular myth is that Macs (since OS X became the standard OS for them) don't get viruses. To be fair, this is technically correct: there are indeed no known viruses on OS X.
Older, pre-OS X versions of the Mac OS did occasionally suffer from the occasional virus as that older OS had a much more basic security model and barely supported multitasking properly. (It shared a lot in common with pre-NT versions of Windows in that area.)
OS X was derived from NeXTSTEP, which was in turn built on a BSD UNIX variant. UNIX was designed from the outset as a multi-user operating system and has a very strong security model.
The article is not talking about a virus however. It is talking about a trojan. A trojan requires user interaction to install itself, usually by pretending to be something the user might want to install—hence the name, "trojan". It relies on the weakest link in any OS' security chain: the users themselves. By default, OS X 10.8 ("Mountain Lion", the version that was released today) prevents any unsigned application from installing. You have to go into the Preferences panels and explicitly tell OS X to allow unsigned application to install too.
A good IT Admin will set that same Preference panel to its most paranoid setting: "Only allow Mac App Store apps to install." This adds an additional layer of security.
Furthermore, the trojan in question is actually a vulnerability in Oracle's Java VMs, not OS X itself. Note that it attacks Windows as well, and requires the user's password to actually install its nasty bits.
Apple haven't been responsible for the OS X version of Java since the release of OS X Lion. Neither are Microsoft responsible for bugs in Oracle's Java VM for Windows.
The security failure lies with Oracle.
Granted, it'd be nice if the OSes were 100% bulletproof and perfect, but the OS that can unerringly spot a user doing something seriously bloody stupid has yet to be developed. Not even GNU / Linux is impervious to such social engineering vectors.
And yes, GNU / Linux-based web-servers are hacked on a frequent basis. What do you think many of those hacked databases full of emails, passwords, and other user details we keep hearing about were running on? BeOS? Why do you think there are companies out there offering specialised "security hardened" Linux distros? If GNU / Linux were that secure out of the box, such distros wouldn't be necessary, would they?
There is, in fact, only one way to ensure you never get hit by a trojan: never install any software you don't trust. On Macs, that means sticking with the curated App Stores for the most part, and only venturing outside the gated community when you really need to. Apple won't stop you if you're determined to go on such an adventure. That's Apple's fundamental design philosophy: you can't assume your users are trained in IT administration, so you simplify things for them and reduce the need for such training in the first place.
The best anti-malware solution is to not install malware in the first place.