How do I convert a stringbuffer into a double in Java?
StringBuffer buffer = new StringBuffer();// StringBuffer object
buffer.append
("11");//add 11 to StringBuffer
String s = buffer.toString();// convert
StringBuffer to string
double num=Double.parseDouble(s);//convert string to
double
System.out.println(num);
Need a fast expert's response?
Submit order
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!
Learn more about our help with Assignments:
JavaJSPJSF