StringBuilder.insert(int offset, double d) has the following syntax.
public StringBuilder insert(int offset, double d)
In the following code shows how to use StringBuilder.insert(int offset, double d) method.
//from w w w. j a va 2 s. c o m public class Main { public static void main(String args[]) { StringBuilder buffer = new StringBuilder(); double doubleValue = 33.3; buffer.insert(0, doubleValue); System.out.println(buffer.toString()); } }
The code above generates the following result.