pastebin

Paste Search Dynamic
Recent pastes
a.add()
  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 Main
  9. {
  10.         public static void foo(List<? super Integer> a) {
  11.                 for (int i=0; i<10; i++) {
  12.                         a.add(i);
  13.                 }
  14.     }
  15.  
  16.         public static void main(string[] args) {
  17.             List<Integer> a = new ArrayList<>();
  18.                 foo(a);
  19.         }
  20. }
Parsed in 0.006 seconds