當前位置:首頁 » 編程語言 » 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-08-22 06:31:21 瀏覽:1000
敬請存儲 發布:2025-08-22 06:25:42 瀏覽:609
linuxphp7配置 發布:2025-08-22 06:17:01 瀏覽:414
shellftp腳本 發布:2025-08-22 06:11:57 瀏覽:796
sql資料庫打開 發布:2025-08-22 05:58:36 瀏覽:888
伺服器IP怎麼找回 發布:2025-08-22 05:41:28 瀏覽:606
手機百度怎樣上傳視頻 發布:2025-08-22 05:28:08 瀏覽:832
亂碼源碼 發布:2025-08-22 05:26:41 瀏覽:204
c語言中基本的數據類型 發布:2025-08-22 05:24:25 瀏覽:809
Android資料庫開源 發布:2025-08-22 05:18:02 瀏覽:631