Code obfuscation is currently one of the best methods for protecting Java code from reverse engineering. Obfuscation renders software unintelligible but still functionally equivalent to the original code, making the code next to impossible for a human to understand and therefor more resistant to reverse engineering and hacking.
Obviously no method is fool proof, and given enough time and money any obfuscation scheme can be cracked. However, most hackers only want to spend a few minutes cracking your product and then move on to the next. So obfuscating your code is like putting an alarm in your car - you hope a code thief sees the protections you have implemented and simply moves on to a less protected victim, leaving your code uncracked and your property secure.