/**
*
* @author xman
*/
public class Tt {
String name = "......";
void query(Tool t) {
t.set(this);
}
public static void main(String[] args) {
Tt tt = new Tt();
tt.query(new Tool<Tt>() {
public void set(Tt o) {
out.println(o.name);
}
});
tt.query((o) -> {
// error
out.println(o.name);
});
}
}
interface Tool<T> {
public void set(T in);
}