Posts

Showing posts from September, 2011

Java 1.7 new Language Features and Enhancements

After long time I came back to my blog page and decided to continue filling the space in my blog. In this blog I'm going to write about the new bunch of features coming with all new JAVA 1.7 or JDK 1.7. Once I gone through those features I really realize some of those enhancements are the things that we are waiting until Sun include those features for us. The following enhancements have been added to the Java language: Binary Literals Underscores in Numeric Literals Strings in switch Statements Type Inference for Generic Instance Creation Improved Compiler Warnings and Errors When Using Non-Reifiable Formal Parameters with Varargs Methods The try-with-resources Statement Catching Multiple Exception Types and Rethrowing Exceptions with Improved Type Checking Binary Literals     In Java SE 1.7 it includes the binary number system with the integral types (byte, short, int, long). To specify  number as a binary value it has to add 0b or  0B  as a prefix. following