Help me with problem at the comment, please. I'm newbie with java8. It would be great too if you give me some keyword for searching.
public class aClass{
public Function<String,String> f;
private void doSomething(){
System.out.println("done");
}
public void addF(Function<String,String> f){
this.f = f;
}
}
public class bClass{
public String func(String str){
System.out.println(str);
//Call doSomething();
//Can I do that?
}
public static void main(String[] args){
aClass a = new aClass();
a.addF(this::func);
}
}