Java 7 Vs Java 6

1. Java 7 is faster than Java 6 performance wise. Ideally any previous code should run faster on Java 7 with same benchmarks. (Read on couple of blogs, need to do my check.)

2. New and Better Concurrent Garbage Collector in Java 7, called G1. Should be able to handle very large Heaps. Again, need to do my check.

3. Modularization of JDK. Which makes sense, since it will reduce the download size, get only what you actually want, reduced start up time and of course lesser memory footprint.

4. Project Jigsaw - which will happen completely in Open source. Related to #3 modularization, Allow other people to develop modules independently and Sun may (or may not) add these components to future releases of Java.

5. AutoClosable and try with resource - Allows auto closing of resource without the need of writing extra code. This is a new interface that comes with Java 7.

6. New constructor has been added to Throwable class which can be used to enable or disable the suppression of exceptions. If disabled none of the suppressed exceptions are tracked.


7. Strings are allowed in switch block. In older versions of java it gives compilation error. 


Enter your email address to get our daily JOBS & INTERVIEW FAQ's Straight to your Inbox.

Make sure to activate your subscription by clicking on the activation link sent to your email