fork download
  1. class T {
  2. public int x;
  3. }
  4.  
  5. class Main {
  6.  
  7. static
  8. <T> T f(T x) { return x; }
  9.  
  10. static
  11. T g(T x) { return new T(); }
  12.  
  13. public static void main(String[] args) {
  14. System.out.println(f("dog"));
  15. System.out.println(g(new T()));
  16. }
  17. }
  18.  
Success #stdin #stdout 0.02s 245632KB
stdin
Standard input is empty
stdout
dog
T@19821f