我有以下消息:
System.out.println("Players take turns marking a square. Only squares not already marked can be picked. Once a player has marked three squares in a row, he or she wins! If all squares are marked and no three squares are the same, a tied game is declared. Have Fun!");
这是一条很长的消息,并且在我的屏幕上出现条纹,我想将它分成几段,这样它就不会破坏我的代码的设计流程。但是,当我按下回车键时,Java 不再将该行解释为字符串; Java认为它是一个单独的声明。如何让 Java 解释多行打印语句?
原文由 chopper draw lion4 发布,翻译遵循 CC BY-SA 4.0 许可协议
你在找这样的东西吗?