Read an input text file and store the tokens in 2 different arrays
A useful first step for you to take is to separate out 1 item of functionality in to a class. Your method should be broken up in to several classes, but you will get the idea with just one.

This one class, call it DataParser for want of a better name, will be used like this:

DataParser parser = new DataParser();
// set up a loop over the input data
for (String line : inputlines) {
    parser.parseLine(line)
}
char[][] chars = parser.getChars();
double[] doubles = parser.getDoubles();


The advantage of this is that you can separate out your file-reading logic from your parsing logic.

Now, about how we read the file. I recommend something simple that's new in Java 7: Files.readAllLines(Path, Charset).

Path inputpath = Paths.get("hello.txt");
List&lt;String&gt; inputlines = Files.readAllLines(inputpath, StandardCharsets.UTF_8);


OK, we have our input lines that way, and we can string together the two sections:

Path inputpath = Paths.get("hello.txt");
List&lt;String&gt; inputlines = Files.readAllLines(inputpath, StandardCharsets.UTF_8);

DataParser parser = new DataParser();
// set up a loop over the input data
for (String line : inputlines) {
    parser.parseLine(line);
}
char[][] chars = parser.getChars();
double[] doubles = parser.getDoubles();


Now, about that DataParser class.... it should look something like:

public class DataParser {
    private final List&lt;char[]&gt; charlist = new ArrayList&lt;&gt;();
    private final List&lt;Double&gt; doublelist = new ArrayList&lt;&gt;();

    public void parseLine(String line) {
        int charpos = line.indexOf('&gt;');
        if (charpos &gt;= 0) {
            charlist.add(line.substring(0, charpos).toCharArray());
            doublelist.add(Double.parseDouble(line.substring(charpos + 1)));
        } else {
            // the line does not have a &gt;
            // throw an exception?
        }
    }

    public char[][] getChars() {
        return charlist.toArray(new char[charlist.size()][]);
    }

    public double[] getDoubles() {
        double[] ret = new double[doublelist.size()];
        int cnt = 0;
        for (Double d : doublelist) {
            ret[cnt++] = d;
        }
        return ret;
    }

}


This class will 'accumulate' the parsed data, and return it when asked. It needs to do some tricks with both accumulators to get the data out in the right format, but you should be able to figure it out.

Edit Here, I did it for you:

import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;


public class DataParser {
    private final List&lt;char[]&gt; charlist = new ArrayList&lt;&gt;();
    private final List&lt;Double&gt; doublelist = new ArrayList&lt;&gt;();

    public void parseLine(String line) {
        int charpos = line.indexOf('&gt;');
        if (charpos &gt;= 0) {
            charlist.add(line.substring(0, charpos).toCharArray());
            doublelist.add(Double.parseDouble(line.substring(charpos + 1)));
        } else {
            // the line does not have a &gt;
            // throw an exception?
        }
    }

    public char[][] getChars() {
        return charlist.toArray(new char[charlist.size()][]);
    }

    public double[] getDoubles() {
        double[] ret = new double[doublelist.size()];
        int cnt = 0;
        for (Double d : doublelist) {
            ret[cnt++] = d;
        }
        return ret;
    }

    public static void main(String[] args) throws IOException {
        Path inputpath = Paths.get("hello.txt");
        List&lt;String&gt; inputlines = Files.readAllLines(inputpath, StandardCharsets.UTF_8);

        DataParser parser = new DataParser();
        // set up a loop over the input data
        for (String line : inputlines) {
            parser.parseLine(line);
        }
        char[][] chars = parser.getChars();
        double[] doubles = parser.getDoubles();

        System.out.println(Arrays.deepToString(chars));
        System.out.println(Arrays.toString(doubles));
    }

}


Output:


   [[a,  , A,  , b,  , u], [b,  , b,  , X,  , g], [Y,  , z,  , N,  , H]]
   [1.0E-4, 5.0E-4, 3.0E-4]