// "Create Method 'run'" "true" class Bug { interface Foo { void run(X x); } public static void main(String[] args) { new Foo() { @Override public void run(Bug o) { o.run(); } }; } private void run() { //To change body of created methods use File | Settings | File Templates. } }