SHARE
TWEET

Untitled

a guest Jun 25th, 2019 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. fun myFunc(args: Array<String>) {
  2.    // do something with the array "args"
  3. }
  4.  
  5. // call it this way:
  6. myFunc(arrayOf("a", "b", "c"))
  7.      
  8. fun myFun(vararg args: String) {
  9.     // use "args" as an Array<String>
  10. }
  11.  
  12. // call it this way:
  13. myFunc("a", "b", "c")
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top