Java multiline string

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

    Define my string in a properties file?

    Multiline strings aren't allowed in properties files. You can use \n in properties files, but I don't think that is much of a solution in your case.

提交回复
热议问题