This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes String Array without knowing dimensions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "String Array without knowing dimensions" Watch "String Array without knowing dimensions" New topic
Author

String Array without knowing dimensions

Anjanesh Lekshminarayanan
Ranch Hand

Joined: Oct 21, 2003
Posts: 46
Anyway to accomplish this with setting the size of the array and without the use of java.util.Arrays ?
I need the get the lines of a file in an array (of n number of lines)
Neither do I want to repeat the entire loop of reading the file to figure out the number of lines.

Actually Im used to PHP and this would normally work in PHP.
Thanks


Anjanesh Lekshminarayanan
Yosi Hendarsjah
Ranch Hand

Joined: Oct 02, 2003
Posts: 164
Hi Anjanesh,
You can use classes that implement List interface, like ArrayList or Vector.

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: String Array without knowing dimensions
 
Similar Threads
Dynamically Creating Files......
how to convert .csv files into sql server files using java
Ignoring white space
AJAX with php
How to get a transfer function to work both ways?