pro_jsp thread: Overall HELPppppppppppppppp for Preeti......
Hi,
Never rely on vectors for storing data for long procedures, as their positions r highly volatile.
Better copy data from vectors to array or enumerated data type
Now u can retrieve info without the fear of losing ur data,
And for U Madam Preeti, first Go through any Java Book, study basics java thoroughly,and then jump for a project.If u r in INDIA
then join Concourse any branch for Java.
If u donot know any other programming language then forget java, do any other programming language along with a project on it, then
jump for java.
After all this u wont have such basic doubts
bye
On Fri, 02 March 2001, "Jeroen T. Wenting" wrote:
>
> I suggest you replace the Vector with an ArrayList. ArrayList is a lot
> faster (I timed it at 3 times as fast in one application which handled a
> collection of 1500 items, others have reported similar or larger
> differences).
> Using an ArrayList, you can also easily get an Iterator on it
> (ArrayList.iterator()), so you can just loop through it with
> Item item=null;
> while (iterator.hasnext())
> {
> item = (Item) iterator.next();
> }
> -----Original Message-----
> From: Preeti [mailto:preetisikri@h...]
> Sent: 02 March 2001 21:01
> To: Pro_JavaServer_Pages
> Cc: javacertstudy@y...; jcertification@y...;
> Beginning Java; A mailing list about Java Server Pages specification and
> reference; AJUG-SCPJava2@y...
> Subject: [pro_jsp] basic problem .. vector HELPppppppppppppppp
>
>
> Hi guys Actually I'm stucked with a vector problem actually I have a
> vector in I have stored some id's now I want to take those id's 1 by 1out
> and wanna store them into a variable how will I do that ...... Like right
> now I hae a fuction for adding a id to vector but I do not have a function
> to retirve those id's and placing them into a var .. for adding I have
> something like : public Vector addtocart(int id) { if(id > 0) {
> list.addElement(new Integer(id)); } return list; } now I wanna retrive those
> id something like this int newid = take out id from vector ; pls tell me how
> to do this Thanks in advance Regards Preeti --- You are currently subscribed
> to pro_jsp as: jwenting@h...
> $subst('Email.Unsub')
>
>
Chequemail.com - a free web based e-mail service that also pays!!!
http://www.chequemail.com