tags:

views:

254

answers:

2

I'm aware of the class file format change using -target 1.6 (which is required when you use -source 1.6). But does the source option specifically change anything or enable any new features?

+11  A: 

From the javac documentation:

1.6 - This is the default value. No language changes were introduced in Java SE 6. However, encoding errors in source files are now reported as errors, instead of warnings, as previously.

Brian Agnew
First three answers identical (including my now deleted one) - I guess the fastest gun wins :-) +1.
paxdiablo
I found one additional difference which is not well documented: In JDK 1.6, the @Override annotation became valid to apply to methods which implement interfaces (which do not override a superclass method).
Mark Renouf
+1  A: 

From Sun's javac documentation:

No language changes were introduced in Java SE 6. However, encoding errors in source files are now reported as errors, instead of warnings, as previously.

Jon Bright