Java SE 7 introduced several new features to the Java programming language. Some of the key features included try-with-resources statements to automatically close resources, strings in switch statements for more efficient bytecode generation, and catching multiple exception types in the same catch block. Other enhancements were type inference for generic instance creation to reduce duplicated code, underscores in numeric literals for improved readability, and the fork/join framework for parallel programming. The file system API was improved with NIO 2 and the JVM saw performance enhancements such as the G1 garbage collector and invoke dynamic for dynamic languages.