String concatenation: Difference between revisions

m
Added a compilable example vs running in REPL shell
m (Added a compilable example vs running in REPL shell)
Line 938:
fansh> b
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}}==
57

edits