Shevek (shevek) wrote,
Shevek
shevek

Brain benders for Java, just for fun.

A Java-1.5 loop iterator may be declared final.

An empty statement is legal, but an unreachable empty statement is not.

if (false) does not create unreachable code.

And some less exciting but annoying ones:

A method with a parameterized return type is treated as raw if the static type of the object is raw, even if the parameter of the return type is independent.
Subscribe
  • Post a new comment

    Error

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 8 comments