How do I make a string with a " character in it? (Java)

后端 未结 4 970
生来不讨喜
生来不讨喜 2021-01-19 12:47

Well that was pretty much my question, I need to do something like this:

String scriptContent = \"print(\"Hello World\")\";
4条回答
  •  暖寄归人
    2021-01-19 13:51

    apache commons has a StringEscapeUtils http://commons.apache.org/lang/api-2.4/org/apache/commons/lang/StringEscapeUtils.html

提交回复
热议问题