Java multiline string

前端 未结 30 2856
醉梦人生
醉梦人生 2020-11-22 15:55

Coming from Perl, I sure am missing the \"here-document\" means of creating a multi-line string in source code:

$string = <<\"EOF\"  # create a three-l         


        
30条回答
  •  攒了一身酷
    2020-11-22 16:38

    Stephen Colebourne has created a proposal for adding multi-line strings in Java 7.

    Also, Groovy already has support for multi-line strings.

提交回复
热议问题