Is it possible to create static inner function using lambda?
Specifically, I want to do the following:
function myFunc(){
Map<Integer, String> myMap = new HashMap <Integer, String> ();
myMap.put(1,"A");
String head = () -> myMap.get(1);
myMap.put(1,"B");
System.out.println(head); // Should print B
}
System.out.println(myMap.get(1))?