Java tutorial
//package com.java2s; public class Main { public static float[] toFloatArray(String flattened) { String[] list = flattened.split(" "); float[] points = new float[list.length]; for (int i = 0; i < list.length; i++) points[i] = Float.parseFloat(list[i]); return points; } }