I try to write this line in a text file:
graph[bgcolor=white, size="9", center=1, margin="0.5, 0.5"];
like this:
out.write("graph [bgcolor=white, size="+9+", center="+1+", margin="+0.5,0.5+"];");
but it returns me an error at margin="+0.5,0.5+"
How can I solve this?
Thanks
You have to escape the string. It will be better to use String.format() method.
String str="Hello \"World\"";
String strOut=String.format("graph[bgcolor=white, size=\"%s\", center=%s, margin=\"%s, %s\"]",9,1,0.5,0.5);
out.write(strOut);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With