Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- String a = "Hello ";
- String b = a.concat("World"); // b = Hello World
- val a = "Hello"
- val b = "World"
- val c = "$a $b"
- val a = "Hello"
- val b = "World"
- val c = a + b // same as calling operator function a.plus(b)
- print(c)
- val a = "Hello"
- val b = "World"
- val sb = StringBuilder()
- sb.append(a).append(b)
- val c = sb.toString()
- print(c)
- var fn = "Hello"
- var ln = "World"
- a.plus(b)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement