Improved type inference in java 7

Before java 7, while using generics you had to supply type parameters to variables types and to their actual types. Now, it has been relieved a bit in this new java 7 feature, and a blank diamond on right side of declaration will work properly. Java 7 Compiler will identify that blank diamond infer to type defined on left hand side of declaration.

public class JavastuffOper {
    public static void main(String[] args) {
       Map<string , Double> params = new HashMap<>();  
// Rest of the code

}
}


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


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