Java tutorial
//package com.java2s; public class Main { public static float[] getFloatArray(String str) { String[] list = str.split(","); float[] ar = new float[list.length]; int i = 0; for (String s : list) { ar[i++] = Float.parseFloat(s); } return ar; } }