// splitting a string literal over more than one line String s = "abcdefghijklmnopqrst" + "uvwxyz";
There is no speed penalty for the + concatenation. It is done at compile time. String literals can be used anywhere you might use a String reference, e. g. "abc".charAt(1) is legal. For problematic/awkward/reserved/quotable characters like embedded ", see escape sequences below.
This page is posted |
http://mindprod.com/jgloss/literal.html | |
Optional Replicator mirror
|
J:\mindprod\jgloss\literal.html | |
Please read the feedback from other visitors,
or send your own feedback about the site. Contact Roedy. Please feel free to link to this page without explicit permission. | ||
Canadian
Mind
Products
IP:[65.110.21.43] Your face IP:[3.12.123.41] |
| |
Feedback |
You are visitor number | |