I\'m trying to declare and define larger hash map at once. This is how I do it:
public HashMap> opcode_only = new HashMap&l
You are doing correct, update JDK library to 1.8 version from Java Build Path in Eclipse Project properties.
I just now tried the below code and it is working fine on my Eclipse:
HashMap hmLambda = new HashMap() {
{
put(0, 1);
put(1, 1);
}
};
System.out.println(hmLambda.get(0));
hmLambda.forEach((k, v) -> System.out.println("Key " + k
+ " and Values is: " + v));