fork download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6.  
  7. interface I<T> {
  8. T doStuff();
  9. }
  10.  
  11. class A implements I<Void> {
  12. @Override
  13. public Void doStuff() {
  14. return null; // ничего другого вернуть нельзя (если не хитрить с рефлексией, конечно)
  15. }
  16. }
  17.  
  18. /* Name of the class has to be "Main" only if the class is public. */
  19. class Ideone {
  20. public static void main (String[] args) throws java.lang.Exception {
  21. A a = new A();
  22. }
  23. }
Success #stdin #stdout 0.1s 27864KB
stdin
Standard input is empty
stdout
Standard output is empty