aspose file tools*
The moose likes Java in General and the fly likes vector object to array conversion..urgent.. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "vector object to array conversion..urgent.." Watch "vector object to array conversion..urgent.." New topic

vector object to array conversion..urgent..

karan, chopra
Ranch Hand

Joined: Jun 05, 2001
Posts: 115
hi all,
i have vector containing some arrays,now when i want to extract these arrays from the vector then how should i do it.because if i just write the following:
arrayname = vector.firstElement();
then i get the following error: incompatible types
found : java.sql.Array
required: int[]
arr1 = (Array)stringreceive.firstElement();
please suggest some solution,i would appreciate it..
Junaid Bhatra
Ranch Hand

Joined: Jun 27, 2000
Posts: 213
This should work assuming you have a vector of int arrays:
int[] array = (int[])vector.firstElement();
I agree. Here's the link:
subject: vector object to array conversion..urgent..
Similar Threads
vector object to array conversion..urgent..
garbage collection
what is the difference between arrays,vector and Array List?
Array VS. Vector, which is better?
How to implement expandable array