Why doesn't Java support multi-line strings? [closed]

隐身守侯 提交于 2019-12-04 15:20:09

问题


Why doesn't Java support multi-line strings? I know they dont, but I dont know why. Is there a good reason? Several other languages have this capability, even older ones, so why doesnt Java? As far as I know (not very far) it shouldnt be too had to add this functionality to your lexers/compilers.

Edit: For clarification, I dont mean a string with a newline character in it. I mean something like this:

String s = "Hello
            World";

Edit2: I dont know why people thought I was asking for opinions, I most certainly am not. I specifically asked for good reasons. I suppose I need to explicitly say based on facts as well?

来源:https://stackoverflow.com/questions/22722255/why-doesnt-java-support-multi-line-strings

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!