當前位置:首頁 » 編程語言 » java跨行

java跨行

發布時間: 2023-08-27 11:12:41

java中的讓字元串跨行符號是什麼

你說的意思:

.net中:

stringquery=@"SELECTfoo,bar
FROMtable
WHEREid=42";

php

<?php
$str=<<<'EOD'
Exampleofstring
spanningmultiplelines
usingnowdocsyntax.
EOD;

echo<<<'EOT'
Mynameis"$name".Iamprintingsome$foo->foo.
Now,Iamprintingsome{$foo->bar[1]}.
Thisshouldnotprintacapital'A':x41
EOT;
?>

這種跨行書寫,不用在每句話的後面添加+

groovy:

assert'''hello,
world'''=='hello, world'
//triple-quotesformulti-linestrings,adds' 'regardlessofhostsystem
assert'hello,
world'=='hello,world'//

java中有沒有?沒有

熱點內容
硬碟緩存128m 發布:2025-09-18 01:15:13 瀏覽:752
蘋果手機設備密碼是指什麼 發布:2025-09-18 01:02:26 瀏覽:466
asp門戶網站源碼 發布:2025-09-18 00:54:00 瀏覽:448
java資料庫例子 發布:2025-09-18 00:53:58 瀏覽:219
sh腳本輸出 發布:2025-09-18 00:48:10 瀏覽:257
我的世界伺服器箱里的東西沒了 發布:2025-09-18 00:39:20 瀏覽:934
java數字轉大寫 發布:2025-09-18 00:25:58 瀏覽:312
網路編程百度雲 發布:2025-09-18 00:19:52 瀏覽:125
安卓手機供電在哪裡 發布:2025-09-18 00:08:38 瀏覽:394
Linux調度器 發布:2025-09-18 00:01:50 瀏覽:276