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

后端 未结 4 969
生来不讨喜
生来不讨喜 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:50

    Use \".

    String scriptContent = "print(\"Hello World\")";
    

提交回复
热议问题