ããã«ã¡ã¯ãtobi462ï¼éå»è¨äºä¸è¦§ï¼ã§ãã ä»æ¥ã¯ãKotlinã§å¯å¤é·å¼æ°ã使ç¨ããæã«ããã£ããã¨ããã£ãã®ã§ãã¢ã³ããã¿ã¼ã³ã®å ±æã§ãã å¯å¤é·å¼æ°ï¼varargï¼ åä¸ã®åã®å¼æ°ãä¸ç·ã«ä½¿ã æè¨ã¨ãã¦ã®ã¢ã³ããã¿ã¼ã³ æå¾ã« å¯å¤é·å¼æ°ï¼varargï¼ å¯å¤é·å¼æ°ã®æ¦å¿µã¯Java5ãããããã®ã§ãKotlinã§ãä¼¼ãããã«é åã¨ãã¦å¼æ°ãåãåãä»æ§ã«ãªã£ã¦ãã¾ãããæ§æãå°ãéãã¾ãã Kotlinã§ã¯varargã¨ãã修飾åãç¨ãã¦ãå¯å¤é·å¼æ°ã宣è¨ãã¾ãã // å®£è¨ fun printAll(vararg values: String) { println(values::class.java) // => class [Ljava.lang.String; values.forEach { println(it) } } // ä½¿ç¨ printAll("Apple
{{#tags}}- {{label}}
{{/tags}}