Advertisement
Guest User

Untitled

a guest
Feb 8th, 2016
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. public class Blog
  2. {
  3. public static void main(String []args)
  4. {
  5. User[] userList = new User[3];
  6. userList[0] = new User("what.com", "TheLegionCrab", "Jake Parham", "jparham@gmail.com");
  7. userList[1] = new User("huh.com", "RaggleFraggle", "Brett Hawkins", "bhawkins@gmail.com");
  8. userList[2] = new User("buh.com", "SeanBeast", "Sean Sweeney", "ssweeney@gmail.com");
  9.  
  10. for(int counter = 0; counter<userList.length; counter++)
  11. {
  12. User.getName();
  13. }
  14. }
  15. }
  16.  
  17. public class User
  18. {
  19. private String url;
  20. private String userName;
  21. private String realName;
  22. private String email;
  23.  
  24. public User(String url, String userName, String realName, String email)
  25. {
  26. this.url = url;
  27. this.userName = userName;
  28. this.realName = realName;
  29. this.email = email;
  30. }
  31. public void getName(String userName)
  32. {
  33. System.out.println(userName);
  34. }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement