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

熱點內容
鳳凰地下商城wifi密碼是多少 發布:2025-02-04 14:42:00 瀏覽:903
哈希查找演算法 發布:2025-02-04 14:40:36 瀏覽:465
雲伺服器顯示黑洞 發布:2025-02-04 14:29:05 瀏覽:300
redhatlinux教程 發布:2025-02-04 14:24:48 瀏覽:831
nvidia緩存清理嗎 發布:2025-02-04 14:16:55 瀏覽:307
筆記本電腦如何設置鎖屏密碼 發布:2025-02-04 13:54:42 瀏覽:163
構成c語言程序的基本單位 發布:2025-02-04 13:49:53 瀏覽:990
如何修改已經更改的密碼 發布:2025-02-04 13:38:38 瀏覽:776
唐dm2021買哪個配置劃算 發布:2025-02-04 13:38:38 瀏覽:628
真空壓縮重 發布:2025-02-04 13:38:37 瀏覽:643