fork download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4.  
  5. /* The class name doesn't have to be Main, as long as the class is not public. */
  6. class Main
  7. {
  8. public static void main (String[] args) throws java.lang.Exception
  9. {
  10. List<Integer> list = new ArrayList<Integer>();
  11. List l2 = list;
  12. l2.add("hello");
  13. }
  14. }
Success #stdin #stdout 0.07s 215488KB
stdin
1
2
10
42
11
stdout
Standard output is empty