1) input not more than 256KB = 262144 Bytes, consequently there no more than 131072 numbers in input. That's size of array you need
2) Instead of creating instance of StringTokenizer for each line in input, you can simply using StreamTokenizer (like in FAQ:
http://acm.timus.ru/help.aspx?topic=java ) reading nval when nextToken() == StreamTokenizer.TT_NUMBER until it not equals to TT_EOF
3) For formatted output you can use:
System.out.printLn(String.format("%.4f", numberVariable));
because String.format implicitly creating new Formatter object, you can speed up program and reduce memory usage by creating one instance:
Formatter f = new Formatter();
...
System.out.printLn(f.format("%.4f", numberVariable));
be sure you're using Locale.US as default, in other way there comma instead of period can appear in place of decimal-separator.
You can manually set Locale.setDefault(Locale.US); in beggining of your program
4) anyway to reach greatest speed and least memory usage for input-output, you can write your own method to read/write numbers from/into input/output streams using once-createrd byte arrays.