AppletTalk.com Forum Index AppletTalk.com
Java discussions newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Arrays in vector

 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java Help
View previous topic :: View next topic  
Author Message
Seamoon
Guest





PostPosted: Mon Mar 01, 2004 9:46 pm    Post subject: Arrays in vector Reply with quote



Hi,

I want to put arrays of bytes of different lengths in a vector, but if I got
it right only objects can be placed in a vector so how do I convert an array
to and from an object? Ie. if I were to put an atomic datatype like int in a
vector it could be done using the wrapperclass Integer, like v.addLast(new
Integer(64)). What's the corresponding action for arrays?

/Seamoon


Back to top
Christophe Vanfleteren
Guest





PostPosted: Mon Mar 01, 2004 9:57 pm    Post subject: Re: Arrays in vector Reply with quote



Seamoon wrote:

Quote:
Hi,

I want to put arrays of bytes of different lengths in a vector, but if I
got it right only objects can be placed in a vector so how do I convert an
array to and from an object? Ie. if I were to put an atomic datatype like
int in a vector it could be done using the wrapperclass Integer, like
v.addLast(new Integer(64)). What's the corresponding action for arrays?

/Seamoon

Have you even tried to do what you want?
Hint: all arrays are Objects in java.

--
Kind regards,
Christophe Vanfleteren

Back to top
Lloyd
Guest





PostPosted: Wed Mar 03, 2004 12:31 am    Post subject: Re: Arrays in vector Reply with quote




"Seamoon" <ulfsbecker*remove*@swipnet.se> wrote

Quote:
Hi,

I want to put arrays of bytes of different lengths in a vector, but if I
got
it right only objects can be placed in a vector so how do I convert an
array
to and from an object? Ie. if I were to put an atomic datatype like int in
a
vector it could be done using the wrapperclass Integer, like v.addLast(new
Integer(64)). What's the corresponding action for arrays?


An array _is_ an object.



Back to top
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.