public class TestLamuda {
@Test
public void testLamuda(){
MyABC myABC = new MyABC();
myABC.changeState(state -> {
System.out.println(state);
return state;
});
}
interface RunnerABC {
public String accept(String state);
}
class MyABC {
public String changeState(RunnerABC abc){
return abc.accept("");
}
}
}
网友评论