Home arrow static arrow Java Programming [Archive] - ArrayLists and Vectors
Warning: Creating default object from empty value in /www/htdocs/w008deb8/wiki/components/com_staticxt/staticxt.php on line 51
Java Programming [Archive] - ArrayLists and Vectors
This topic has 24 replies on 2 pages.    « Previous | 1 | 2 |

Posts:105
Registered: 6/8/04
Re: ArrayLists and Vectors  
Jul 27, 2004 10:33 AM (reply 15 of 24)



 
I doubt he searched for a thread specifically to show off and just happened upon this one.

This is just a necropost. The guy found an incredibly old post (probably by changing the "start=" parameter in the URL to, say, 129105) and replied to it to see if he could fool people.

It's nothing new; common message board prank.
 

Posts:281
Registered: 12/23/03
Re: ArrayLists and Vectors  
Jul 27, 2004 10:34 AM (reply 16 of 24)



 
Hi,

I am new to ArrayLists. I would like to know the
difference between ArrayLists and
Vectors.And which cases both should be used. What are
the advantages and disadvantages of
both

Could someone help me with my homework please
 

Posts:1,025
Registered: 04-03-17
Re: ArrayLists and Vectors  
Jul 27, 2004 3:13 PM (reply 17 of 24)



 
I'm curious as to how this person found the post to reply to it.

It's their only post in 3 years.

I wonder... could it be...

Unfrozen Caveman Programmer ?!?!?!?!

"Your world frightens and confuses me! Sometimes the odd noises from these metal boxes scares me and makes me want to run back to my cave. Sometimes when I look up at the ceiling I see these strange tubes that light up at the flick of a wall stick, I wonder, did demons catch light from the sun and put it there? I don't know! My primitive mind can't grasp these concepts."
 

Posts:3
Registered: 4/7/02
Re: ArrayLists and Vectors  
Jul 28, 2004 8:06 AM (reply 18 of 24)



 
I wonder... could it be...

Unfrozen Caveman Programmer ?!?!?!?!

oh my god thats classic.
 

Posts:24,036
Registered: 2/3/03
Re: ArrayLists and Vectors  
Jul 28, 2004 8:26 AM (reply 19 of 24)



 
Unfrozen Caveman Programmer ?!?!?!?!

LMAO.
 

Posts:5,965
Registered: 5/17/03
Re: ArrayLists and Vectors  
Jul 28, 2004 8:29 AM (reply 20 of 24)



 
Don't crosspost -:)

http://forum.java.sun.com/thread.jsp?thread=167872&forum=1&message=510043
 

Posts:3,258
Registered: 00-08-28
Re: ArrayLists and Vectors  
Jul 28, 2004 8:54 AM (reply 21 of 24)



 
Well, ArrayLists and Vectors both implement the list
interface. So they are similar in providing index
based access, in providing re-sizing capability. etc.

No they are not similar in resizing, Internally, both the ArrayList and Vector hold onto their contents using an Array. You need to keep this fact in mind while using either in your programs. When you insert an element into an ArrayList or a Vector, the object will need to expand its internal array if it runs out of room. A Vector defaults to doubling the size of its array, while the ArrayList increases its array size by 50 percent. Depending on how you use these classes, you could end up taking a large performance hit while adding new elements. It's always best to set the object's initial capacity to the largest capacity that your program will need. By carefully setting the capacity, you can avoid paying the penalty needed to resize the internal array later. If you don't know how much data you'll have, but you do know the rate at which it grows, Vector does possess a slight advantage since you can set the increment value.

(quote from http://www.javaworld.com/javaworld/javaqa/2001-06/03-qa-0622-vector.html )

 

Posts:3,258
Registered: 00-08-28
Re: ArrayLists and Vectors  
Jul 28, 2004 8:55 AM (reply 22 of 24)



 
Don't crosspost -:)

http://forum.java.sun.com/thread.jsp?thread=167872&foru
=1&message=510043

isnt that a post from 2001
 

Posts:24,036
Registered: 2/3/03
Re: ArrayLists and Vectors  
Jul 28, 2004 8:57 AM (reply 23 of 24)



 
isnt that a post from 2001

Uhm yeah. Kinda like this one...
 

Posts:1,025
Registered: 04-03-17
Re: ArrayLists and Vectors  
Jul 28, 2004 9:59 AM (reply 24 of 24)



 
Don't crosspost -:)
http://forum.java.sun.com/thread.jsp?thread=167872&forum=1&message=510043

isnt that a post from 2001

Unfrozen Caveman Crossposter?
"I fell on some ice and later got thawed out by some of your forum moderators."

Okay, I went too far...sorry.
 
This topic has 24 replies on 2 pages.    « Previous | 1 | 2 |