interface DoNothing{ public void doNothing(template MyObject a); } public class Tester implements DoNothing{ public void doNothing(template MyObject a){ System.out.println("hi"); return; } public Tester(){} public static void main(String[] args){ Tester t = new Tester(); t.doNothing(new template MyObject (1)); System.out.println("done."); } } template public class MyObject{ public T value; public MyObject(T value){ this.value = value; } }