It doesn't recognize item[1]
I guess it's because the method is declared as a string in public static void main(STRING[] args)
. But how else should I declare the main method in oder to have the Integers accepted?
This is the message Eclips comes up with: Exception in thread "main" java.lang.ArrayStoreException: [Ljava.lang.Integer;
at Package1.test7.main(test7.java:18)
// import java.util.arrays;
public class test7
{
public static void main(String[] args)
{
Object[][] items = new String[2][];
items[0] = new String[]{"a", "b"};
(18)items[1] = new Integer[]{1, 2, 4};
System.out.println (items[0]);
}
}