StringBuffer.insert(int offset, double d) has the following syntax.
public StringBuffer insert(int offset, double d)
In the following code shows how to use StringBuffer.insert(int offset, double d) method.
/*w w w . jav a2 s.co m*/ public class Main { public static void main(String args[]) { StringBuffer buffer = new StringBuffer(); double doubleValue = 33.3; buffer.insert(0, doubleValue); System.out.println(buffer.toString()); } }
The code above generates the following result.