I have a complicated drawing procedure written in Octave. I want to call it from JAVA. So, I am generating some octave query using JAVA to call this draw
function. However, this part of code does not seem to me right:
String line = "draw('" + header + "','" + title + "'," + Arrays.toString(y1) + "," + Arrays.toString(y2) + "');";
Here, it is very hard to read because of the '
and "
s.
Is there any other better way to do it?
There is! Try
String.format
: