The Artima Developer Community
Sponsored Link

Java Answers Forum
arrays + random access files

1 reply on 1 page. Most recent reply: Nov 21, 2002 9:37 PM by Daniel Ray

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
mary

Posts: 5
Nickname: marymary
Registered: Nov, 2002

arrays + random access files Posted: Nov 19, 2002 10:16 AM
Reply to this message Reply
Advertisement
how do you create an array from a random access file. I have created a String Tokenizer to split the values up but i don't know how to go about assigning the values in the String Tokenizer to the array.Please Help!!


Daniel Ray

Posts: 53
Nickname: budoray
Registered: Oct, 2002

Re: arrays + random access files Posted: Nov 21, 2002 9:37 PM
Reply to this message Reply
Try this .. I didn't write code to test

ArrayList list = new ArrayList()

while(tokenizer.hasMoreTokens()){
list.add(tokenizer.nextToken());

}
String[] str = (String[])list.toArray();

Ray

Flat View: This topic has 1 reply on 1 page
Topic: precise positioning of ocmponents Previous Topic   Next Topic Topic: inserting a csv file into a database

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use