Logo

Programming-Idioms

History of Idiom 48 > diff from v43 to v44

Edit summary for version 44 by 1.7.4:
New Java implementation by user [1.7.4]
↷

Version 43

2018-08-03, 21:30:21

Version 44

2019-01-25, 11:45:02

Idiom #48 Multi-line string literal

Assign to variable s a string literal consisting in several lines of text

Idiom #48 Multi-line string literal

Assign to variable s a string literal consisting in several lines of text

Extra Keywords
multiline raw
Extra Keywords
multiline raw
Code
String s = "This is a very long string which needs " +
           "to wrap across multiple lines because " +
           "otherwise my code is unreadable.";
Comments bubble
Credit goes to the JS equivalent—but I'm not sure how to provide a link.