Get your CodeRanch badge!*
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 Java 8 in Action this week in the Java 8 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
Ignoring white space
Dynamically Creating Files......
How to get a transfer function to work both ways?
AJAX with php
how to convert .csv files into sql server files using java