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...
Type: Posts; User: Bryan
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...
I know ;) but I didn't really had the chance yet to explore ArrayLists. I just know the base :( I rather use hashtables :)
Ahh, didn't knew that :) I though you would have to make the capacity bigger manual, like calling a method.
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...
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.
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.