當前位置:首頁 » 編程語言 » 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中有沒有?沒有

熱點內容
比分網源碼 發布:2025-03-18 11:00:22 瀏覽:749
不顯示腳本錯誤 發布:2025-03-18 10:58:14 瀏覽:417
網路攝像頭與伺服器怎麼搭建 發布:2025-03-18 10:51:49 瀏覽:554
java區塊鏈 發布:2025-03-18 10:35:54 瀏覽:368
私自搭建伺服器盈利違法么 發布:2025-03-18 10:32:33 瀏覽:7
os壓縮文件 發布:2025-03-18 10:26:54 瀏覽:866
安卓什麼樣的型號算是大陸國行 發布:2025-03-18 10:14:54 瀏覽:729
android添加百度地圖 發布:2025-03-18 10:05:41 瀏覽:419
音樂源碼開發 發布:2025-03-18 09:41:45 瀏覽:51
android布局demo 發布:2025-03-18 09:11:38 瀏覽:800