Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. String a = "Hello ";
  2. String b = a.concat("World"); // b = Hello World
  3.  
  4. val a = "Hello"
  5. val b = "World"
  6. val c = "$a $b"
  7.  
  8. val a = "Hello"
  9. val b = "World"
  10. val c = a + b // same as calling operator function a.plus(b)
  11.  
  12. print(c)
  13.  
  14. val a = "Hello"
  15. val b = "World"
  16.  
  17. val sb = StringBuilder()
  18. sb.append(a).append(b)
  19. val c = sb.toString()
  20.  
  21. print(c)
  22.  
  23. var fn = "Hello"
  24. var ln = "World"
  25.  
  26. a.plus(b)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement