Java tutorial
//package com.java2s; public class Main { public static float[] toSize(String str, float scale) { String[] strs = str.split(","); return new float[] { toLength(strs[0], scale), toLength(strs[1], scale) }; } public static float toLength(String str, float scale) { return Float.valueOf(str) / scale; } }