LAMBDA
package japan.example.test; public class InterfaceTest { public static void main(String[] args) { final Tab tab = new Tab(); tab.test((x) -> { String name = x.getClass().getSimpleName(); System.err.println(name); }); } } class Tab { public void test(Tbc test) { test.tbc(this); } } interface Tbc { void tbc(Tab tab); } class TBC implements Tbc { Object obj; public TBC(Object obj) { this.obj = obj; } @Override public void tbc(Tab tab) { obj.toString(); } }