Skip to content

Instantly share code, notes, and snippets.

@Mercerenies
Created June 2, 2018 18:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Mercerenies/bf7632b6882a188136125f2975b2d4ad to your computer and use it in GitHub Desktop.
Save Mercerenies/bf7632b6882a188136125f2975b2d4ad to your computer and use it in GitHub Desktop.
import java.util.ArrayList;
import java.util.Collection;
public class CollRaw {
public static interface Test {
public StringBuilder append(Collection<?> value);
}
public static class TestOne implements Test {
@Override
public StringBuilder append(Collection<?> value) {
value.add(Integer.valueOf(1));
return new StringBuilder();
}
}
public static void main(String[] args) {
ArrayList c = new ArrayList();
TestOne a = new TestOne();
a.append(c);
System.out.println(c.get(c.size()-1).toString());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment