Created
June 2, 2018 18:16
-
-
Save Mercerenies/bf7632b6882a188136125f2975b2d4ad to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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