Search:

Type: Posts; User: camel-man

Search: Search took 0.19 seconds.

  1. Replies
    5
    Views
    956

    Re: Creating new objects within methods

    "blah" in my case is the data type. In your case it would be User. You might want to put User in another class instead of having it in main.


    public class User
    {
    String username;
    String...
  2. Replies
    5
    Views
    956

    Re: Creating new objects within methods

    create an arrayList of objects. Then use the constructor for the usernames and passwords.


    ArrayList<blah> t = new ArrayList<blah>();

    t.add(new blah(/*the username , the password*/));

    You...
  3. Replies
    5
    Views
    956

    Re: Creating new objects within methods

    How about prompting the user in main to enter in a username and password. Then use the username and password in the constructor of the object you create.

    example

    enter in username
    //user...
Results 1 to 3 of 3