Java SE 14(2020å¹´3æ)ã§ã¯ããã¬ãã¥ã¼æ©è½ã¨ãã¦Record(jep359)ãå°å ¥ããã¾ããRecordã®ç®çã¯ã"ãã¬ã¼ã³ãã¼ã¿"ã®éåããããå°ãªãã»ã¬ã¢ãã¼ã§ã¢ãã«åã§ããããã«ãããã¨ã§ããåç´ãªx-y座æ¨ã®æ½è±¡åã§ããã°ã次ã®ããã«å®£è¨ãããã¨ãã§ãã¾ãã record Point(int x, int y) { } ããã«ãã£ã¦å¤æ´ä¸å¯è½(immutable)ãªã³ã³ãã¼ãã³ãã§ããxãyã¨ãã®é©åãªã¢ã¯ã»ãµãã³ã³ã¹ãã©ã¯ã¿ãequalsãhashCodeãtoStringã®å®è£ ãæã£ãPointã¨ããfinalã¯ã©ã¹ã宣è¨ããã¾ãã ãããã¯ãããããå®å½¢ã³ã¼ãã§è£å®ãããã³ã³ã¹ãã©ã¯ã¿å®è£ ãObjectã¡ã½ãããã¢ã¯ã»ãµãè¨è¿°ãã(ãããã¯IDEãçæãã¦ããã)æ¹æ³ã§ããã°ãããæ®éã«ä½¿ç¨ããã¦ãããã®ã§ãã ãã®ãããªã³ã¼ããæ¸ãã®ã¯ç¢ºãã«é¢åã§ããããã£
{{#tags}}- {{label}}
{{/tags}}