String concatenation: Difference between revisions

Content added Content deleted
m (Added a compilable example vs running in REPL shell)
Line 938: Line 938:
fansh> b
fansh> b
abcdef</syntaxhighlight>
abcdef</syntaxhighlight>

<syntaxhighlight lang="java">
/* gary chike 08/27/2023 */

class Main
{
static Void main() {
s1 := "Only The"
s2 := "knows"
s3 := s1 + " Fantom " + s2 + "!" // Concatenation
echo(s3)
s4 := "$s1 Fantom $s2!" // String interpolation
echo(s4)
}
}
</syntaxhighlight>

{{out}}
<pre>
Only The Fantom knows!
Only The Fantom knows!
</pre>


=={{header|Fe}}==
=={{header|Fe}}==