ã¾ããJava ã®é åãã¿ã¤ãã»ã¼ãã§ã¯ãªã話ã public class ExampleArray { public static void main(String[] args) { String[] strArray = {"test1", "test2"}; Object[] objArray = strArray; // é åã¯å ±å¤ãªã®ã§ä»£å ¥å¯è½ objArray[0] = new Integer(3); // java.lang.ArrayStoreException } } ä¸è¨ã®ããã«ãJava ã®é åã¯å ±å¤ã¨ããæ§è³ªãæã£ã¦ããã®ã§ãObject[] ã« String[] ãä»£å ¥ãããã¨ãã§ãã¾ããã¤ã¾ããString[] 㯠Object[] ã®ãµãã¯ã©ã¹ã§ãããã¨ãããã¨ã§ãã ããããGenerics ã®å ´åã¯ããã®æ§è³ªãå½ã¦ã¯ã¾ãã¾ããï¼Generics ã¯å ±å¤ã§
{{#tags}}- {{label}}
{{/tags}}