Comment Comment by strictfp I much prefer Cs solution to this problem; you can write multiple literals in sequence and they will be concatenated: char* text = "hello" " dear" " sir"; This is great, because it doesn't make leading whitespace significant on the lines which the text block spans.The Java approach, which seems similar to the Python approach, looks really silly when you are defining a literal in a nested scope; def hello(): def world(): text = """hello world""" print text parent strictfp 6 years ago
The Java approach, which seems similar to the Python approach, looks really silly when you are defining a literal in a nested scope;