Java multiline string

前端 未结 30 2913
醉梦人生
醉梦人生 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:19

    In the IntelliJ IDE you just need to type:

    ""
    

    Then position your cursor inside the quotation marks and paste your string. The IDE will expand it into multiple concatenated lines.

提交回复
热议问题