在这里,我有两个哈希图dataz
和screen_dataz
. 我想复制screen_dataz
到dataz
.
我正在尝试这样但它不起作用:
Object[] obj = new Object[5];
String[] strArray = new String[]{"Obj1","Array1","Converted1","To1","List1"};
String[] strArray1 = new String[]{"Obj2","Array2","Converted2","To2","List2"};
dataz.put(0,(Object[]) strArray);
dataz.put(1,(Object[]) strArray1);
// String dataString = (String) dataz;
System.out.println(dataz);
Object[] obj1= new Object[5];
String[] strArray2 = new String[]{"Obj3","Array3","Converted3","To3","List3"};
String[] strArray3 = new String[]{"Obj4","Array4","Converted4","To4","List4"};
screen_dataz.put(0,(Object[]) strArray2);
screen_dataz.put(1,(Object[]) strArray3);
System.out.println("copying screen dataz to dataz");
dataz.putAll(screen_dataz);