String.split() returns an array of Strings, and you know the indexes that you want to save (6-8). So there's at least one simple way to do it: make your new array of String and walk through it, putting the first value in the first slot, the second value in the second slot, and the third in the third slot.
Now if you're doing this more than once, you should make it a method. Something like
private String subArray(String, int startIndex, int endIndex)
// your code in here
//return the sub-array
If this is the same problem you were posting about earlier in the week, split will work just fine. You've got a line - a String - and you want it broken into parts. The main difference is that with the tokenizer, you've got to step through the parts one by one, probably in a for loop until you get to the parts you want. With split, you get an array and you can just grab the bits that you need.
Either will work, but I think you were right the first time.
there's at least one simple way to do it: make your new array of String and walk through it, putting the first value in the first slot, the second value in the second slot, and the third in the third slot.
Write a C program that should create a 10 element array of random integers (0 to 9). The program should total all of the numbers in the odd positions of the array and compare them with the total of the numbers in the even positions of the array and indicate ...
I have a 2d matrix with dimension (3, n) called A, I want to calculate the normalization and cross product of two arrays (b,z) (see the code please) for each column (for the first column, then the second one and so on).
the function that I created to find the ...