Use \ at the end of the line like
someSQL = select result \
from myTable \
where y = 2 \
and x = ? \
order by z
Also, beware of any trailing whitespaces since Java looks for consecutive backslash+linebreak when assembling the lines.
Put differently : The backslash has to be the very last caracter on the line before the line break.