I have corrected the code tags for him. It is actually [code=java]…, slightly different from what you wrote.
Piet Souris wrote: . . .
use the button 'code'. Select your code, and click that button.
If you want to do this by hand (as I think you did), then use the tags
[code[ = java]]...[/code] in stead of <code>...</code>. . . .