File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

vector object to array conversion..urgent..

 
karan, chopra
Ranch Hand
Posts: 115
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,
i have a 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:
testframenew.java:409: incompatible types
found : java.sql.Array
required: int[]
arr1 = (Array)stringreceive.firstElement();
please suggest some solution,i would appreciate it..
regards
karan
PS- arrayname is an array of type int..
 
Manfred Leonhardt
Ranch Hand
Posts: 1492
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Karan,
When you retrieve vector elements you must cast them back into the correct objects. In your case:
arrayname = (int[])vector.firstElement();
should work.
Manfred.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic