January 11th, 2011 11:48 AM
#1
How to save strings from StringSplit to different arrays..
Hi.. I am having a problem regarding the saving of split words from StringSplit function..
array output stores my input per line
my input, for instance is:
int data_type
a identifier
. terminator
i use:
for(int i=0;i<=outputlength;i++)
array[i]=java.util.Arrays.toString(output[j].split(" "));
then if i print the contents of array[], i get:
int, data_type
a, identifier
., terminator
i want to get the first words of lines into an array and the second words into another array,
for example:
array a has [int, a, .]
and array b has [data_type, identifier, terminator]
Any kind of help will be appreciated, thank you!
Tags for this Thread
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules
Click Here to Expand Forum to Full Width
Bookmarks