Multiline string literals

Peter Reilly peter.kitt.reilly at
Sat Aug 6 03:41:05 PDT 2011

Now that jdk7 is released and there will shortly be a process for
asking for new small features in jdk8, I would like to ask that
support for multiline string literals be considered.

This is a long standing request and a specific proposal is contained in:

An example of the current mess is in:

 String schemaDescription =
            " {    \n" +
                    " \"name\": \"FacebookUser\", \n" +
                    " \"type\": \"record\",\n" +
                    " \"fields\": [\n" +
                    "   {\"name\": \"name\", \"type\": \"string\"},\n" +
                    "   {\"name\": \"num_likes\", \"type\": \"int\"},\n" +
                    "   {\"name\": \"num_photos\", \"type\": \"int\"},\n" +
                    "   {\"name\": \"num_groups\", \"type\": \"int\"} ]\n" +

it would be *much* nicer to say:
 String schemaDescription = """{
                    "name": "FacebookUser",
                    "type": "record",
                    "fields": [
                    {"name": "name", "type": "string"},
                    {"name": "num_likes", "type": "int\"},
                    {"name": "num_photos", "type": "int"},
                    {"name": "num_groups", "type": "int"} ]


More information about the coin-dev mailing list