interface Generic { T foo(); } class II implements Generic { public Object foo() { return null; //To change body of implemented methods use File | Settings | File Templates. } }