fork(1) download
  1. import java.util.*;
  2.  
  3. interface Sortable
  4. {
  5. public int compare( Sortable compareTo );
  6. }
  7.  
  8. class SortableDouble implements Sortable
  9. {
  10. public double value;
  11.  
  12. public SortableDouble( double aValue )
  13. {
  14. value = aValue;
  15. }
  16.  
  17. public int compare( Sortable compareTo )
  18. {
  19. if (value > ((SortableDouble)compareTo).value)
  20. return 1;
  21. else if (value < ((SortableDouble)compareTo).value)
  22. return -1;
  23. else
  24. return 0;
  25. }
  26. }
  27.  
  28. class SortableList<T extends Sortable> extends ArrayList<T>
  29. {
  30. public void Sort()
  31. {
  32. }
  33.  
  34. public SortableList<T> Highest( int n )
  35. {
  36. Sort();
  37. return null;
  38. }
  39. }
  40.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
spoj: The program compiled successfully, but main class was not found.
      Main class should contain method: public static void main (String[] args).
stdout
Standard output is empty