Java StringBuffer.insert(int offset, double d)
Syntax
StringBuffer.insert(int offset, double d) has the following syntax.
public StringBuffer insert(int offset, double d)
Example
In the following code shows how to use StringBuffer.insert(int offset, double d) method.
// w w w .j av a2 s.com
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.