Search:

Type: Posts; User: Bryan

Search: Search took 0.10 seconds.

  1. Replies
    14
    Views
    4,763

    Re: Array object and constructors

    Great, thats what I need often, also for my current project. When I put objects in the hashtable I want to sign my own key to it, which often will be objectId() or something similar. Thanks for the...
  2. Replies
    14
    Views
    4,763

    Re: Array object and constructors

    I know ;) but I didn't really had the chance yet to explore ArrayLists. I just know the base :( I rather use hashtables :)
  3. Replies
    14
    Views
    4,763

    Re: Array object and constructors

    Ahh, didn't knew that :) I though you would have to make the capacity bigger manual, like calling a method.
  4. Replies
    14
    Views
    4,763

    Re: Array object and constructors

    ArrayList<Officer> officerlist = new ArrayList<Officer>();
    As long you keep the constructor empty, the ArrayList will have no limit of amount of objects it can hold.

    Is this what you need?

    BTW...
  5. Replies
    14
    Views
    4,763

    Re: Array object and constructors

    String n=Code+Name+Grade;This is no good.
    You need to understand inheritance. Code and name are need to be called like: super.code, super.name and grade can be called like this.grade.
  6. Replies
    14
    Views
    4,763

    Re: Array object and constructors

    This is how you make a ArrayList

    ArrayList alist = new ArrayList(3);
    alist.add("something");
    alist.add("something2");
    alist.add("something3");


    I dont quite understand you question.
Results 1 to 6 of 6