• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

help in java.

Semidevil

Diamond Member
ok, very easy question, but I just cant do it.

I have 2 classes, a "bucket" class, and a "bucket_store" class.

I have already created a bucket store class, but now, I want to create 4 buckets and put it in the store. how do I do that?

so all I did is create a vector of buckets

Vector bucket = new Vector(4);

so how do I put them all into the store?

is it "Store.addBucket" or something??
 
You didn't create a Vector of buckets, you created a Vector CALLED "bucket".

READ


You want something more like this:

Vector hash = new Vector();

for(int ii = 0; ii < 4;ii++){
hash.add(new Bucket());
}
 
ok, thanx

so now I created a vector of buckets...........how do I put it in my store??

also, if I created a vector of 4 buckets, how do I differentiate them? Is there a way? just bucket1, bucket2, bucket3, and bucket4 will be fine......
 
create a method in the store class that creates buckets?
the store class needs some sort of "method" or variable to add those buckets to itself and it should ahve the handling to identify the buckets as well (accessors). The vector can be recognized probobly as bucket[0], bucket[1], etc...
 
Back
Top