I have searched this, but couldn't find what i need, so i created a new post. I hope to understand about this problem. Thanks.
ArrayList<String> arraylist= new ArrayList<String>();
arraylist.add("Nguyen");
arraylist.add("Viet");
String[] name={"Quan","Doan","Thi","Ha"};
arraylist.add(name);// error here
ArrayList<Object> arraylist1=new ArrayList<Object>();
arraylist1.add("Nguyen");
arraylist1.add("Viet");
Object[] name1={"Quan","Doan","Thi","Ha"};
arraylist1.add(name1);// not error
Can someone explain that when i pass name into add() method then I get a error, but when i pass name1 into add() method, it works fine, why is it so...


Object[]is anObject