Here you can find the source of toDouble(Object val)
public static Double toDouble(Object val)
//package com.java2s; public class Main { public static Double toDouble(Object val) { if (val == null) return null; if (val instanceof Number) return Double.valueOf(((Number) val).doubleValue()); return Double.valueOf(val.toString()); }/*from w w w .j a v a 2s.com*/ public static String toString(int... results) { StringBuilder sb = new StringBuilder(); sb.append('['); sb.append(' '); for (int i : results) sb.append(i).append(','); sb.setCharAt(sb.length() - 1, ' '); sb.append(']'); return sb.toString(); } }