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. /* Name of the class has to be "Main" only if the class is public. */
  8. class Ideone
  9. {
  10.  
  11. public class A implements Function<String, String>, Formattable {
  12.  
  13. public String apply(String input) {
  14. return input.toString();
  15. }
  16.  
  17. }
  18. public static void main (String[] args) throws java.lang.Exception
  19. {
  20. // your code goes here
  21.  
  22. System.out.println(new A() );
  23. }
  24. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:11: error: cannot find symbol
public class A implements Function<String, String>, Formattable {
                          ^
  symbol:   class Function
  location: class Ideone
Main.java:11: error: Ideone.A is not abstract and does not override abstract method formatTo(Formatter,int,int,int) in Formattable
public class A implements Function<String, String>, Formattable {
       ^
Main.java:22: error: non-static variable this cannot be referenced from a static context
System.out.println(new A() );
                   ^
3 errors
stdout

Standard output is empty