Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- List<String> list = new ArrayList<String>() {{add("hello"); add("goodbye");}}
- List<String> list = new ArrayList<String>();
- list.add("hello");
- list.add("goodbye");
- public boolean equals(Object ob) {
- if (!(ob instanceof MyClass)) return false;
- ...
- }
- public boolean equals(Object ob) {
- if (ob.getClass() != getClass()) return false;
- ...
- }
- List<String> list = new ArrayList<String>(
- Arrays.asList("hello", "goodbye")
- );
Add Comment
Please, Sign In to add comment