paradoxed

Untitled

Mar 17th, 2016
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. import java.util.ArrayList;
  2. /**
  3. * Created by 7804364 on 3/17/2016.
  4. */
  5. public class Main {
  6.  
  7. public void main (String[] args) {
  8. ArrayList<Person> listPersons = new ArrayList<Person>();
  9. listPersons.add(new Person("George Bush","Grey",69));
  10. listPersons.add(new Person("Michael Jackson","Brown",50));
  11. listPersons.add(new Person("Barrack Obama","Black",54));
  12. listPersons.add(new Person("Adele","Blond",27));
  13.  
  14. for (Person b : listPersons) {
  15. System.out.println(b.getName()+" "+b.getHaircolor()+" "+b.getAge()+ " Years old");
  16. }
  17. }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment