Last active
August 29, 2015 14:21
-
-
Save fkaa/6bdc58cd05273c629032 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
public class Foo { | |
public int bar; | |
public Foo(int bar) { | |
this.bar = bar; | |
} | |
} |
This file contains hidden or 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; | |
public class Main { | |
public static void main(String[] args) { | |
ArrayList<Foo> list = new ArrayList<>(); | |
Foo foo = new Foo(5); | |
list.add(foo); | |
System.out.println(list.get(0)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment