ã¿ãã«(tuple)ã¨ã¯ ã¿ãã«ã¯ç°ãªãåã®è¦ç´ ãè¤æ°æã¤ãã¨ãã§ããã³ã³ãããªãã¸ã§ã¯ã ãªã¹ãã¨åæ§ã«ã¤ãã¥ã¼ã¿ãã«(ä¸å¤) ã¿ãã«ã®ä½¿ç¨ æ°ããã¯ã©ã¹ãä½æããã«ãè¤æ°ã®å¤ã1ã¤ã«ã°ã«ã¼ãåãã¦æ±ããã Javaã§ã¯ã¡ã½ããã®æ»ãå¤ãªã©ã§ãè¤æ°ã®å¤ãè¿å´ããå ´åã¯å¥éãªãã¸ã§ã¯ããä½æããå¿ è¦ãããã¾ãããã¿ãã«ã使ãã¨ç°¡ç´ ãªã³ã¼ããå®ç¾ã§ãã¾ãã object Main extends Application { val tuple = (1, 2, 3) val (a, b ,c) = tuple // ä¸æ¬ã§ä»£å ¥ println("a:" + a + " b:" + b + " c:" + c) // a:1 b:2 c:3 } ã¿ãã«ã®è¦ç´ ã¸ã®ã¢ã¯ã»ã¹ åè¦ç´ ã¸ã®ã¢ã¯ã»ã¹ã¯ä»¥ä¸ã®æ§ã«ãæ¸ãã¾ããä¸ã¨åãçµæã¨ãªãã¾ãã object Main extends Applicat
{{#tags}}- {{label}}
{{/tags}}