Sponsored Link •
Legacy Java Answers Forum
This page contains an archived post to the Java Answers Forum made prior to February 25, 2002.
If you wish to participate in discussions, please visit the new
Posted by Matt Gerrans on October 25, 2001 at 10:49 PM
> Use the plus(+) sign instead of the backslash
> > String strTest = "First Line \
> > sdfsdfsdf";
Well, you'll also need to add a couple more quote marks, like so:
String strTest = "'Twas brillig " +
" and the slithy toves...";
What you are really doing is not a line-continuation (which doesn't exist in Java), but concatenating two strings to make a longer one.