Monday 11 February 2013

Java 1.7 features.

    1) JDBC 4.1 more efficient introduced with the following features:
        The ability to use a try-with-resources statement to automatically close resources of type Connection, ResultSet, and Statement
        RowSet 1.1: The introduction of the RowSetFactory interface and the RowSetProvider class, which enable you to create all types of row sets supported by your JDBC driver.
    2) String objects can be as Switch literals.
        case "ONE": sop("one"); break;
    3) Automatic Type referece during Generic instance creation.
        Map> sample = HashMap<>(); 
        <> - operator called as diamond operator.
    4) try statement defining resources. No need of finally method to close this resources.
        try(file reader){
            return (readline)
        }
    5) Catch block to handle multiple exceptions.
        catch( arrayourofboune | numberformatexception | ex)
        since we cant use the main exception with in multple exception.
    6) JVM enhancement.

    7) IO - Zip File System Provider, Custom file system provider, java.nio.*, etc

No comments:

Post a Comment