Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Blog
- {
- public static void main(String []args)
- {
- User[] userList = new User[3];
- userList[0] = new User("what.com", "TheLegionCrab", "Jake Parham", "jparham@gmail.com");
- userList[1] = new User("huh.com", "RaggleFraggle", "Brett Hawkins", "bhawkins@gmail.com");
- userList[2] = new User("buh.com", "SeanBeast", "Sean Sweeney", "ssweeney@gmail.com");
- for(int counter = 0; counter<userList.length; counter++)
- {
- User.getName();
- }
- }
- }
- public class User
- {
- private String url;
- private String userName;
- private String realName;
- private String email;
- public User(String url, String userName, String realName, String email)
- {
- this.url = url;
- this.userName = userName;
- this.realName = realName;
- this.email = email;
- }
- public void getName(String userName)
- {
- System.out.println(userName);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement